From 1f833fcc41e1d112edc153a58e2db6558dbe3596 Mon Sep 17 00:00:00 2001 From: Joerg Bornkessel Date: Sun, 7 Oct 2012 19:43:32 +0200 Subject: grub2 support added --- usr/share/vdr/shutdown/shutdown-reboot.sh | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'usr') diff --git a/usr/share/vdr/shutdown/shutdown-reboot.sh b/usr/share/vdr/shutdown/shutdown-reboot.sh index 9855096..27859d0 100644 --- a/usr/share/vdr/shutdown/shutdown-reboot.sh +++ b/usr/share/vdr/shutdown/shutdown-reboot.sh @@ -17,7 +17,7 @@ case "${BOOT_MANAGER}" in /etc/init.d/wakeup-reboot-halt mark_for_reboot ;; grub) - mount /boot + mount /boot if [ -n "${REBOOT_ENTRY_GRUB}" ]; then case "${GRUB_SET_REBOOT_ENTRY_METHOD:=grub-set-default}" in grub-set-default) @@ -42,6 +42,25 @@ case "${BOOT_MANAGER}" in mesg "reboot entry not set, can not reboot." fi ;; + grub2) + mount /boot + if [ -n "${REBOOT_ENTRY_GRUB}" ]; then + case "${GRUB_SET_REBOOT_ENTRY_METHOD:=grub2-set-default}" in + grub2-set-default) + if [ -x /usr/sbin/grub2-set-default ]; then + /usr/sbin/grub2-set-default "${REBOOT_ENTRY_GRUB}" + else + mesg "command grub2-set-default not found!" + fi + ;; + *) + mesg "Unknown grub method ${GRUB_SET_REBOOT_ENTRY_METHOD}." + ;; + esac + else + mesg "reboot entry not set, can not reboot." + fi + ;; lilo) mount /boot if [ -n "${REBOOT_ENTRY_LILO}" ]; then -- cgit v1.2.3-65-gdbad