aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoerg Bornkessel <hd_brummy@gentoo.org>2012-10-07 19:43:32 +0200
committerJoerg Bornkessel <hd_brummy@gentoo.org>2012-10-07 19:43:32 +0200
commit1f833fcc41e1d112edc153a58e2db6558dbe3596 (patch)
treebc28fde5eb93bda3b5463f1046922f0e176c9d0b
parentchanged parameter for paludis, fix trigger for full systemupdate (diff)
downloadgentoo-vdr-scripts-1f833fcc41e1d112edc153a58e2db6558dbe3596.tar.gz
gentoo-vdr-scripts-1f833fcc41e1d112edc153a58e2db6558dbe3596.tar.bz2
gentoo-vdr-scripts-1f833fcc41e1d112edc153a58e2db6558dbe3596.zip
grub2 support added
-rw-r--r--ChangeLog4
-rw-r--r--etc/conf.d/vdr.shutdown5
-rw-r--r--usr/share/vdr/shutdown/shutdown-reboot.sh21
3 files changed, 26 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 4f5948a..e1899ab 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for gentoo-vdr-scripts
# $Id$
+ 07 Oct 2012; Joerg Bornkessel <hd_brummy@gentoo.org> etc/conf.d/vdr.shutdown,
+ usr/share/vdr/shutdown/shutdown-reboot.sh:
+ grub2 support added
+
29 Apr 2012; Joerg Bornkessel <hd_brummy@gentoo.org>
vdrplugin-rebuild/vdrplugin-rebuild:
changed parameter for paludis, fix trigger for full systemupdate
diff --git a/etc/conf.d/vdr.shutdown b/etc/conf.d/vdr.shutdown
index 202ec68..c4fb6b0 100644
--- a/etc/conf.d/vdr.shutdown
+++ b/etc/conf.d/vdr.shutdown
@@ -97,10 +97,9 @@
#
# Only used for WAKEUP_METHOD nvram when motherboard needs reboot
-# allowed values: auto grub lilo
+# allowed values: auto grub grub2 lilo
# default: use auto - use a special startup-script, no need to play with boot-managers :)
#BOOT_MANAGER="auto"
-#BOOT_MANAGER="grub"
#
# Which entry in the boot manager configuration should nvram use to
@@ -178,7 +177,7 @@
#
# This should normally not changed.
-# allowed values: grub-set-default savedefault
+# allowed values: grub-set-default savedefault grub2-set-default
# default: grub-set-default
#GRUB_SET_REBOOT_ENTRY_METHOD="grub-set-default"
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