diff options
author | Bob Gilligan <gilligan@vyatta.com> | 2010-02-08 12:02:18 -0800 |
---|---|---|
committer | Bob Gilligan <gilligan@vyatta.com> | 2010-02-08 12:02:18 -0800 |
commit | 3f6bb58b0f98f8ca9dd986f8f274906c33596083 (patch) | |
tree | 7ec3c7ae4fbdf518560c49ba98d6e7e9747dc9f0 /scripts/vyatta-grub-setup | |
parent | d1c814b29aeb7dd2b581a4ffea23bde61331bcf5 (diff) | |
download | vyatta-cfg-quagga-3f6bb58b0f98f8ca9dd986f8f274906c33596083.tar.gz vyatta-cfg-quagga-3f6bb58b0f98f8ca9dd986f8f274906c33596083.zip |
Bugfix 5225: Include the OS version number in the grub menu entry.
Diffstat (limited to 'scripts/vyatta-grub-setup')
-rwxr-xr-x | scripts/vyatta-grub-setup | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/scripts/vyatta-grub-setup b/scripts/vyatta-grub-setup index 68d12614..3a38bd5f 100755 --- a/scripts/vyatta-grub-setup +++ b/scripts/vyatta-grub-setup @@ -26,12 +26,18 @@ # # +# The OS version we are installing +version="" + UNION="false" -while getopts u: c +while getopts u:v: c do case $c in u) UNION=true; - livedir=$OPTARG;; + livedir=$OPTARG; + version=$livedir;; + + v) version=$OPTARG;; esac done shift `expr $OPTIND - 1` @@ -198,7 +204,7 @@ fi if [ -f "$ROOTFSDIR/boot/vmlinuz" ] && ! eval $UNION ; then # Set first system boot option. Make KVM the default console in this one. - echo -e "menuentry \"Vyatta (KVM console)\" {" + echo -e "menuentry \"Vyatta $version (KVM console)\" {" echo -e "\tlinux /boot/vmlinuz $GRUB_OPTIONS $VGA_LOGO $vty_console" echo -e "\tinitrd /boot/initrd.img" echo -e "}" @@ -206,7 +212,7 @@ fi # Set the second system boot option. Make the serial port be the default # console in this one. echo - echo -e "menuentry \"Vyatta (Serial console)\" {" + echo -e "menuentry \"Vyatta $version (Serial console)\" {" echo -e "\tlinux /boot/vmlinuz $GRUB_OPTIONS $serial_console" echo -e "\tinitrd /boot/initrd.img" echo -e "}" @@ -216,12 +222,12 @@ fi if [ -n "$union_kernel_versions" ]; then for kversion in $union_kernel_versions; do echo - echo -e "menuentry \"Vyatta linux$kversion (KVM console)\" {" + echo -e "menuentry \"Vyatta $version linux$kversion (KVM console)\" {" echo -e "\tlinux /boot/$livedir/vmlinuz$kversion $GRUB_OPTIONS $vga_logo $vty_console" echo -e "\tinitrd /boot/$livedir/initrd.img$kversion" echo -e "}" echo - echo -e "menuentry \"Vyatta linux$kversion (Serial console)\" {" + echo -e "menuentry \"Vyatta $version linux$kversion (Serial console)\" {" echo -e "\tlinux /boot/$livedir/vmlinuz$kversion $GRUB_OPTIONS $serial_console" echo -e "\tinitrd /boot/$livedir/initrd.img$kversion" echo -e "}" @@ -232,12 +238,12 @@ fi if [ -n "$kernel_versions" ]; then for kversion in $kernel_versions; do echo - echo -e "menuentry \"Vyatta linux$kversion (KVM console)\" {" + echo -e "menuentry \"Vyatta $version linux$kversion (KVM console)\" {" echo -e "\tlinux /boot/vmlinuz$kversion $GRUB_OPTIONS $vga_logo $vty_console" echo -e "\tinitrd /boot/initrd.img$kversion" echo -e "}" echo - echo -e "menuentry \"Vyatta linux$kversion (Serial console)\" {" + echo -e "menuentry \"Vyatta $version linux$kversion (Serial console)\" {" echo -e "\tlinux /boot/vmlinuz$kversion $GRUB_OPTIONS $serial_console" echo -e "\tinitrd /boot/initrd.img$kversion" echo -e "}" @@ -252,13 +258,13 @@ fi fi echo - echo -e "menuentry \"Lost password change (KVM console)\" {" + echo -e "menuentry \"Lost password change $version (KVM console)\" {" echo -e "\tlinux $reset_boot_path/vmlinuz $GRUB_OPTIONS $vga_logo $vty_console init=$pass_reset" echo -e "\tinitrd $reset_boot_path/initrd.img" echo -e "}" echo - echo -e "menuentry \"Lost password change (Serial console)\" {" + echo -e "menuentry \"Lost password change $version (Serial console)\" {" echo -e "\tlinux $reset_boot_path/vmlinuz $GRUB_OPTIONS $serial_console init=$pass_reset" echo -e "\tinitrd $reset_boot_path/initrd.img" echo -e "}" |