installer: add poweroff function, some cleanups

Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
Stephan Raue 2010-07-06 20:01:27 +02:00
parent e0afb6ef6b
commit b86123ed0c

View File

@ -160,7 +160,7 @@ function do_install_mbr() {
menu_main
;;
255)
echo 255
do_poweroff
;;
esac
}
@ -270,7 +270,7 @@ function do_install_quick() {
menu_main
;;
255)
echo 255
do_poweroff
;;
esac
}
@ -332,7 +332,7 @@ function menu_main() {
MSG_CANCEL="Reboot"
dialog --colors --backtitle "$BACKTITLE" --cancel-label "$MSG_CANCEL" \
--title "$MSG_TITLE" --menu "$MSG_MENU" 25 70 8 \
--title "$MSG_TITLE" --menu "$MSG_MENU" 20 70 5 \
1 "Quick Install OpenELEC.tv" \
2 "Custom Install OpenELEC.tv" \
3 "Setup OpenELEC.tv" \
@ -348,11 +348,14 @@ function menu_main() {
3) menu_setup; break;;
4) menu_bios; break;;
5) logfile_show; break;;
esac;;
esac
;;
1)
do_reboot;;
do_reboot
;;
255)
echo 255;;
do_poweroff
;;
esac
}
@ -379,11 +382,14 @@ function menu_bios() {
case $ITEM_BIOSMENU in
1) bios_backup; break;;
2) bios_update; break;;
esac;;
esac
;;
1)
menu_main;;
menu_main
;;
255)
echo 255;;
do_poweroff
;;
esac
}
@ -418,6 +424,13 @@ function do_reboot() {
reboot
}
function do_poweroff() {
# powerdown on request
clear
sync
poweroff
}
# setup needed variables
TMPDIR="/tmp/installer"
BETA="yes"