--- usr-lib-setup/SeTconfig.orig 2013-08-17 22:40:12.656040864 +0300 +++ usr-lib-setup/SeTconfig 2013-10-12 17:52:13.756889353 +0300 @@ -1,4 +1,7 @@ #!/bin/sh +#added grub installation option +# by Dimitris Tzemos +# TMP=/var/log/setup/tmp if [ ! -d $TMP ]; then mkdir -p $TMP @@ -71,7 +74,7 @@ existing system, you can back out to the main menu and skip this step. \ However (important exception) if you've installed a new kernel image, it's \ important to reconfigure your system so that you can install LILO (the Linux \ -loader) or create a bootdisk using the new kernel. You want to CONFIGURE \ +loader) or GRUB or create a bootdisk using the new kernel. You want to CONFIGURE \ your system, right?" 0 0 if [ ! $? = 0 ]; then exit @@ -82,6 +85,21 @@ sleep 3 fi +dialog --title " Choose The Boot Loader That Be Installed Later" \ +--menu "\n" 0 0 0 \ +"Lilo" "Install Lilo" \ +"Grub" "Install Grub" \ +"EXIT" "(Do not install boot loader)" \ +2> $TMP/reply + OPTION="`cat $TMP/reply`" +if [ "$OPTION" = "Lilo" ]; then + BOOT_LOADER="Lilo" +elif [ "$OPTION" = "Grub" ]; then + BOOT_LOADER="Grub" +else + BOOT_LOADER="None" +fi + # Post installation and setup scripts added by packages. if [ -d $T_PX/var/log/setup ]; then # Prepare for LVM in a newly installed system @@ -94,6 +112,7 @@ chroot $T_PX /sbin/vgscan --mknodes --ignorelockingfailure 2> /dev/null fi fi + for INSTALL_SCRIPTS in $T_PX/var/log/setup/setup.*; do SCRIPT=`basename $INSTALL_SCRIPTS` # Here, we call each script in /var/log/setup. Two arguments are provided: @@ -101,9 +120,11 @@ # 2 -- the name of the root device. ( cd $T_PX if [ -x var/log/setup/$SCRIPT ]; then - if [ -r $TMP/isAuto ] && [ "$SCRIPT" == "setup.liloconfig" ]; then + if [ -r $TMP/isAuto ] && [ "$BOOT_LOADER"=="Lilo" ] && [ "$SCRIPT" == "setup.liloconfig" ]; then ./var/log/setup/$SCRIPT $T_PX $ROOT_DEVICE "auto" - else + elif [ -r $TMP/isAuto ] && [ "$BOOT_LOADER"=="Grub" ] && [ "$SCRIPT" == "setup.grubconfig" ]; then + ./var/log/setup/$SCRIPT $T_PX $ROOT_DEVICE "auto" + else # Don't run GPM configuration during installation. Most people # would probably want this off and if someone wants it he can # always run mouseconfig after installation, @@ -111,6 +132,10 @@ sleep 0 elif [ "$SCRIPT" == "setup.netconfig" ] && [ "$MODE" == "FULL" ]; then sleep 0 + elif [ "$SCRIPT" == "setup.liloconfig" ] && [ "$BOOT_LOADER" != "Lilo" ]; then + sleep 0 + elif [ "$SCRIPT" == "setup.grubconfig" ] && [ "$BOOT_LOADER" != "Grub" ]; then + sleep 0 else ./var/log/setup/$SCRIPT $T_PX $ROOT_DEVICE sleep 2