obosdi-pkg/config/menu

33 lines
731 B
Text
Raw Permalink Normal View History

2015-08-20 14:37:06 -06:00
#!/bin/bash
. ./lib
options=()
options+=("Bash" "")
options+=("Firewall" "")
2019-01-02 16:16:10 -07:00
options+=("Accounts" "")
2018-09-15 16:20:14 -06:00
options+=("Systemd" "")
if [ -f /usr/bin/Xorg ]; then
options+=("XOrg" "")
fi
2019-01-02 16:10:33 -07:00
options+=("Boot" "")
2015-08-20 14:37:06 -06:00
defaultitem=""
2022-11-10 14:27:23 -07:00
sel=$(dialog --backtitle "$apptitle" --title "Config Menu :" --default-item "$defaultitem" --cancel-button "Back" --menu "" 0 0 0 \
2015-08-20 14:37:06 -06:00
"${options[@]}" \
3>&1 1>&2 2>&3)
if [ ! "$?" = "0" ]; then
exit 1
fi
sed -i "/^defaultitem=/c\defaultitem=\"$sel\"" $0
case $sel in
'Bash') menu config/bash/menu;;
'Firewall') menu config/firewall/menu;;
2019-01-02 16:16:10 -07:00
'Accounts') menu config/accounts/menu;;
2018-09-15 16:20:14 -06:00
'Systemd') menu config/systemd/menu;;
2015-08-20 14:37:06 -06:00
'XOrg') menu config/xorg/menu;;
2019-01-02 16:10:33 -07:00
'Boot') menu config/boot/menu;;
2015-08-20 14:37:06 -06:00
esac
exit 0