#!/bin/bash

. bk_functions

while [ 0 ]; do

	dialog --backtitle "Linux Bootkit $VERSION" \
	       --title "Main Configuration Menu"\
	       --menu "\nIf you have trouble using the arrow keys, you can use '+', '-',\n\
TAB instead. Which option would you like?" 20 74 10 \
"PATHS" "Configure some important paths and filenames" \
"TOGGLE" "Various bootkit toggle options" \
"RETURN" "Return to the main menu" 2>/tmp/.confselect

if [ $? = 1 -o $? = 255 ]; then 
	rm -f /tmp/.confselect 2>/dev/null
	reset
	exit
fi

CONFSEL="`cat /tmp/.confselect`"
rm -f /tmp/.confselect 2>/dev/null

# Process Selected Option

if [ "$CONFSEL" = "PATHS" ]; then
	./bk_pathconfig
	. ./.bootkit.config
fi

if [ "$CONFSEL" = "TOGGLE" ]; then
	./bk_configtoggle
	. ./.bootkit.config
fi

if [ "$CONFSEL" = "RETURN" ]; then
	reset
	break
fi

done

rm -f /tmp/.getdata.$$ 2>/dev/null
