diff options
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/install-system | 6 | ||||
-rwxr-xr-x | scripts/install/install-postinst-new | 2 | ||||
-rwxr-xr-x | scripts/vyatta-grub-setup | 26 |
3 files changed, 22 insertions, 12 deletions
diff --git a/scripts/install-system b/scripts/install-system index d214d93d..bc2277fd 100755 --- a/scripts/install-system +++ b/scripts/install-system @@ -1015,11 +1015,15 @@ install_grub () { fi fi + version=$(egrep -i version /opt/vyatta/etc/version | awk '{ print $3 }') + # if union install tell vyatta-grub-setup if [ ! -z $UNION ]; then - version=$(egrep -i version /opt/vyatta/etc/version | awk '{ print $3 }') grub_args="-u $version" + else + grub_args="-v $version" fi + if /opt/vyatta/sbin/vyatta-grub-setup $grub_args "$ROOT_PARTITION" "$grub_options" /mnt/rootfs >>$INSTALL_LOG then echo "OK" diff --git a/scripts/install/install-postinst-new b/scripts/install/install-postinst-new index d2187434..e099e030 100755 --- a/scripts/install/install-postinst-new +++ b/scripts/install/install-postinst-new @@ -138,7 +138,7 @@ grub_root=$WRITE_ROOT grub_setup_args="-u $version" if [ "$INSTALL_TYPE" == 'old' ]; then grub_root=$INST_ROOT - grub_setup_args='' + grub_setup_args="-v $version" elif [ "$INSTALL_TYPE" != 'union' ]; then echo 'Invalid install type. Exiting...' exit 1 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 "}" |