diff --git a/ChangeLog b/ChangeLog index 630829b89..fbcfa7159 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2009-06-21 Colin Watson + + * util/grub-mkconfig.in (GRUB_DISABLE_LINUX_RECOVERY): Export + variable. + * util/grub.d/10_linux.in: If GRUB_DISABLE_LINUX_RECOVERY is true, + don't write a menu entry for recovery mode. + 2009-06-20 Robert Millan * util/i386/pc/grub-mkimage.c (main): Oops, free `output' only diff --git a/util/grub-mkconfig.in b/util/grub-mkconfig.in index 6c18f6ac1..4eb7dd2ae 100644 --- a/util/grub-mkconfig.in +++ b/util/grub-mkconfig.in @@ -173,7 +173,7 @@ esac export GRUB_DEVICE GRUB_DEVICE_UUID GRUB_DEVICE_BOOT GRUB_DEVICE_BOOT_UUID GRUB_FS GRUB_FONT_PATH GRUB_PRELOAD_MODULES # These are optional, user-defined variables. -export GRUB_DEFAULT GRUB_TIMEOUT GRUB_DISTRIBUTOR GRUB_CMDLINE_LINUX GRUB_CMDLINE_LINUX_DEFAULT GRUB_TERMINAL_INPUT GRUB_TERMINAL_OUTPUT GRUB_SERIAL_COMMAND GRUB_DISABLE_LINUX_UUID GRUB_GFXMODE +export GRUB_DEFAULT GRUB_TIMEOUT GRUB_DISTRIBUTOR GRUB_CMDLINE_LINUX GRUB_CMDLINE_LINUX_DEFAULT GRUB_TERMINAL_INPUT GRUB_TERMINAL_OUTPUT GRUB_SERIAL_COMMAND GRUB_DISABLE_LINUX_UUID GRUB_DISABLE_LINUX_RECOVERY GRUB_GFXMODE if test "x${grub_cfg}" != "x"; then rm -f ${grub_cfg}.new diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in index ce87cd6e4..e36b5b006 100644 --- a/util/grub.d/10_linux.in +++ b/util/grub.d/10_linux.in @@ -143,8 +143,10 @@ while [ "x$list" != "x" ] ; do linux_entry "${OS}, Linux ${version}" \ "${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}" - linux_entry "${OS}, Linux ${version} (recovery mode)" \ - "single ${GRUB_CMDLINE_LINUX}" + if [ "x${GRUB_DISABLE_LINUX_RECOVERY}" != "xtrue" ]; then + linux_entry "${OS}, Linux ${version} (recovery mode)" \ + "single ${GRUB_CMDLINE_LINUX}" + fi list=`echo $list | tr ' ' '\n' | grep -vx $linux | tr '\n' ' '` done