diff -ru /home/didier/Slint/repo/x86_64/slint-14.2/source/localization/scripts/INCISO /home/didier/Slint/repo/x86_64/slint-14.2.1/next/source/localization/scripts/INCISO --- /home/didier/Slint/repo/x86_64/slint-14.2/source/localization/scripts/INCISO 2016-05-20 14:12:46.000000000 +0200 +++ /home/didier/Slint/repo/x86_64/slint-14.2.1/next/source/localization/scripts/INCISO 2017-09-04 14:06:49.817057000 +0200 @@ -1,5 +1,10 @@ # Determine if there is an ISO image to loop-mount: export TEXTDOMAIN=slint +LANG=$( /dev/null | grep -q "Disklabel type: gpt" ; then - gdisk -l /dev/$drive 2> /dev/null | grep -w EF00 | while read efisp ; do - p="" - echo $drive| grep -q nvme && p="p" - echo /dev/$drive$p$(expr $(echo "$efisp" | cut -b 1-4)) >> $TMP/SeTefipartitions - done - fi + gdisk -l /dev/$drive 2> /dev/null | grep -w EF00 | while read efisp ; do + p="" + echo $drive| grep -q -e nvme -e mmcblk && p="p" + echo /dev/$drive$p$(expr $(echo "$efisp" | cut -b 1-4)) >> $TMP/SeTefipartitions + done done if [ "$(cat $TMP/SeTefipartitions)" = "" ]; then # No EFI partitions diff -ru /home/didier/Slint/repo/x86_64/slint-14.2/source/localization/scripts/SeTPXEHELP /home/didier/Slint/repo/x86_64/slint-14.2.1/next/source/localization/scripts/SeTPXEHELP --- /home/didier/Slint/repo/x86_64/slint-14.2/source/localization/scripts/SeTPXEHELP 2016-05-02 18:52:04.000000000 +0200 +++ /home/didier/Slint/repo/x86_64/slint-14.2.1/next/source/localization/scripts/SeTPXEHELP 2017-09-04 14:06:49.821057000 +0200 @@ -1,5 +1,10 @@ #!/bin/sh export TEXTDOMAIN=slint +LANG=$( # nic=::[:ipaddr:netmask[:gateway]] export TEXTDOMAIN=slint +LANG=$( $TMP/reply - if [ $? = 1 -o $? = 255 ]; then - exit - fi - REPLY="`cat $TMP/reply`" - rm -f $TMP/reply - if [ "$REPLY" = "skip" ]; then - exit - fi + if [ $? = 1 -o $? = 255 ]; then + exit + fi + REPLY="`cat $TMP/reply`" + rm -f $TMP/reply + if [ "$REPLY" = "skip" ]; then + exit + fi fi # Set the OS root directory (called T_PX for some unknown reason). @@ -59,121 +61,119 @@ # is taken to be the root directory. First though, we check for a # directory named $T_PX, and that gets the first priority. if [ ! -d "$T_PX" ]; then - if [ ! "$1" = "" ]; then - if [ -d "$1" ]; then - T_PX="$1" - fi - else - # Are we on the installer image? - if [ -r /usr/lib/setup/SeTpartitions ]; then - T_PX=/mnt - # Or, are we on a running system? - elif [ -r /etc/slint-version ]; then - T_PX=/ - # One more installer-likely thing: - elif [ -r /usr/lib/setup/setup ]; then - T_PX=/mnt - else - # We will have to assume we're on an installed and running system. - T_PX=/ - fi - fi + if [ ! "$1" = "" ]; then + if [ -d "$1" ]; then + T_PX="$1" + fi + else + # Are we on the installer image? + if [ -r /usr/lib/setup/SeTpartitions ]; then + T_PX=/mnt + # Or, are we on a running system? + elif [ -r /etc/slint-version ]; then + T_PX=/ + # One more installer-likely thing: + elif [ -r /usr/lib/setup/setup ]; then + T_PX=/mnt + else + # We will have to assume we're on an installed and running system. + T_PX=/ + fi + fi fi # If os-prober is available, we will use it to filter out unbootable # FAT/NTFS partitions. If it is not availble, we'll use /bin/true # instead to avoid filtering. if which os-prober > /dev/null ; then - OSPROBER=os-prober + OSPROBER=os-prober else - OSPROBER=true + OSPROBER=true fi # Determine LILO documentation directory: LILODOCDIR="$(ls -d $T_PX/usr/doc/lilo-* 2> /dev/null | tail -n 1)" if [ ! -d "$LILODOCDIR" ]; then - LILODOCDIR="/usr/doc/lilo/" + LILODOCDIR="/usr/doc/lilo/" fi -# Start the header for of boot_message.txt: - cat << EOF > $T_PX/boot/boot_message.txt +# If there's no boot_message.txt, write it. +# We ring the bell to help blind users. +if [ ! -r $T_PX/boot/boot_message.txt ]; then + cat <<-EOF > $T_PX/boot/boot_message.txt +You can type or edit the command line below (US keyboard map).  -Welcome to the LILO Boot Loader! - -Please enter the name of the system you would like to boot -at the prompt below. The choices are: - -EOF + EOF +fi # The default install location may be set here: DEFAULT=" --default-item MBR " # This is a different 'probe' than the function below. PROBE() { - if [ -x /sbin/probe ]; then - /sbin/probe -l - elif fdisk -l | grep "Disk /dev/ide" 1> /dev/null 2> /dev/null ; then # no devfs yet - for devs in /dev/hda /dev/hdb /dev/hdc /dev/hdd /dev/hde /dev/hdf /dev/hdg \ - /dev/hdh /dev/hdi /dev/hdj /dev/hdk /dev/hdl /dev/hdm /dev/hdn /dev/hdo /dev/hdp \ - /dev/sda /dev/sdb /dev/sdc /dev/sdd /dev/sde /dev/sdf /dev/sdg /dev/sdh /dev/sdi \ - /dev/sdj /dev/sdk /dev/sdl /dev/sdm /dev/sdn /dev/sdo /dev/sdp ; do - fdisk -l $devs 2> /dev/null - done - elif fdisk -l | grep "Disk /dev/scsi" 1> /dev/null 2> /dev/null ; then # no devfs yet - for devs in /dev/hda /dev/hdb /dev/hdc /dev/hdd /dev/hde /dev/hdf /dev/hdg \ - /dev/hdh /dev/hdi /dev/hdj /dev/hdk /dev/hdl /dev/hdm /dev/hdn /dev/hdo /dev/hdp \ - /dev/sda /dev/sdb /dev/sdc /dev/sdd /dev/sde /dev/sdf /dev/sdg /dev/sdh /dev/sdi \ - /dev/sdj /dev/sdk /dev/sdl /dev/sdm /dev/sdn /dev/sdo /dev/sdp ; do - fdisk -l $devs 2> /dev/null - done - elif [ -z "`fdisk -l`" ]; then - for devs in /dev/hda /dev/hdb /dev/hdc /dev/hdd /dev/hde /dev/hdf /dev/hdg \ - /dev/hdh /dev/hdi /dev/hdj /dev/hdk /dev/hdl /dev/hdm /dev/hdn /dev/hdo /dev/hdp \ - /dev/sda /dev/sdb /dev/sdc /dev/sdd /dev/sde /dev/sdf /dev/sdg /dev/sdh /dev/sdi \ - /dev/sdj /dev/sdk /dev/sdl /dev/sdm /dev/sdn /dev/sdo /dev/sdp ; do - fdisk -l $devs 2> /dev/null - done - else # We got output without /dev/ide or /dev/scsi, so it can probably be trusted: - fdisk -l 2> /dev/null | sed -e "s/Linux filesystem/Linux/g" - fi + if [ -x /sbin/probe ]; then + /sbin/probe -l + elif fdisk -l | grep "Disk /dev/ide" 1> /dev/null 2> /dev/null ; then # no devfs yet + for devs in /dev/hda /dev/hdb /dev/hdc /dev/hdd /dev/hde /dev/hdf /dev/hdg \ + /dev/hdh /dev/hdi /dev/hdj /dev/hdk /dev/hdl /dev/hdm /dev/hdn /dev/hdo /dev/hdp \ + /dev/sda /dev/sdb /dev/sdc /dev/sdd /dev/sde /dev/sdf /dev/sdg /dev/sdh /dev/sdi \ + /dev/sdj /dev/sdk /dev/sdl /dev/sdm /dev/sdn /dev/sdo /dev/sdp ; do + fdisk -l $devs 2> /dev/null + done + elif fdisk -l | grep "Disk /dev/scsi" 1> /dev/null 2> /dev/null ; then # no devfs yet + for devs in /dev/hda /dev/hdb /dev/hdc /dev/hdd /dev/hde /dev/hdf /dev/hdg \ + /dev/hdh /dev/hdi /dev/hdj /dev/hdk /dev/hdl /dev/hdm /dev/hdn /dev/hdo /dev/hdp \ + /dev/sda /dev/sdb /dev/sdc /dev/sdd /dev/sde /dev/sdf /dev/sdg /dev/sdh /dev/sdi \ + /dev/sdj /dev/sdk /dev/sdl /dev/sdm /dev/sdn /dev/sdo /dev/sdp ; do + fdisk -l $devs 2> /dev/null + done + elif [ -z "`fdisk -l`" ]; then + for devs in /dev/hda /dev/hdb /dev/hdc /dev/hdd /dev/hde /dev/hdf /dev/hdg \ + /dev/hdh /dev/hdi /dev/hdj /dev/hdk /dev/hdl /dev/hdm /dev/hdn /dev/hdo /dev/hdp \ + /dev/sda /dev/sdb /dev/sdc /dev/sdd /dev/sde /dev/sdf /dev/sdg /dev/sdh /dev/sdi \ + /dev/sdj /dev/sdk /dev/sdl /dev/sdm /dev/sdn /dev/sdo /dev/sdp ; do + fdisk -l $devs 2> /dev/null + done + else # We got output without /dev/ide or /dev/scsi, so it can probably be trusted: + fdisk -l 2> /dev/null | sed -e "s/Linux filesystem/Linux/g" + fi } # Function to ask if the Slint logo boot screen should be used. ask_boot_splash() { - dialog --title "`gettext "OPTIONAL SLINT LOGO BOOT SCREEN"`" \ - --yesno \ + dialog --title "`gettext "OPTIONAL SLINT LOGO BOOT SCREEN"`" \ + --yesno \ "`gettext "Would you like to use a boot screen with an image? \ If you answer no here, the standard LILO menu will be used. "`" 6 80 2> $TMP/reply - RETVAL=$? - return $RETVAL + RETVAL=$? + return $RETVAL } - +# Function to install a bitmap boot_bmp() { - cat << EO_BMP -# Boot BMP Image. -# Bitmap in BMP format: 640x480x8 - bitmap = /boot/image.bmp -# Menu colors (foreground, background, shadow, highlighted -# foreground, highlighted background, highlighted shadow): - bmp-colors = 0,15,7,15,0,7 -# Location of the option table: location x, location y, number of -# columns, lines per column (max 15), "spill" (this is how many -# entries must be in the first column before the next begins to -# be used. We don't specify it here, as there's just one column. - bmp-table = 56,3,1,16 -# Timer location x, timer location y, foreground color, -# background color, shadow color. - bmp-timer = 46,3,0,15 -EO_BMP + cat <<-EO_BMP + # Boot BMP Image. + # Bitmap in BMP format: 640x480x8 + bitmap = /boot/image.bmp + # Menu colors (foreground, background, shadow, highlighted + # foreground, highlighted background, highlighted shadow): + bmp-colors = 0,15,7,15,0,7 + # Location of the option table: location x, location y, number of + # columns, lines per column (max 15), "spill" (this is how many + # entries must be in the first column before the next begins to + # be used. We don't specify it here, as there's just one column. + bmp-table = 56,3,1,16 + # Timer location x, timer location y, foreground color, + # background color, shadow color. + bmp-timer = 46,3,0,15 + EO_BMP } - # Menu to check if we want to use VESA framebuffer support: use_framebuffer() { if cat /proc/devices | grep "29 fb" 1> /dev/null ; then - dialog --visit-items --title "`gettext "CONFIGURE LILO TO USE FRAME BUFFER CONSOLE?"`" \ - --default-item standard \ - --menu "`gettext "Looking at /proc/devices, it seems your kernel has support for \ + dialog --no-tags --visit-items --title "`gettext "CONFIGURE LILO TO USE FRAME BUFFER CONSOLE?"`" \ + --default-item standard \ + --menu "`gettext "Looking at /proc/devices, it seems your kernel has support for \ the VESA frame buffer console. If we enable this in /etc/lilo.conf, it \ will allow more rows and columns of text on the screen and give you a cool \ penguin logo at boot time. However, the frame buffer text console is \ @@ -181,114 +181,87 @@ or monitor supports all of these video modes, and some X drivers could be \ confused by them. Would you like to use the frame buffer console, \ or the standard Linux console?"`" 0 0 0 \ - "standard" "`gettext "Use the standard Linux console (the safe choice)"`" \ - "ask" "`gettext "Ask about using VESA modes at boot; time out to standard"`" \ - "640x480x64k" "`gettext "Frame buffer console, 640x480x64k"`" \ - "800x600x64k" "`gettext "Frame buffer console, 800x600x64k"`" \ - "1024x768x64k" "`gettext "Frame buffer console, 1024x768x64k"`" \ - "640x480x32k" "`gettext "Frame buffer console, 640x480x32k"`" \ - "800x600x32k" "`gettext "Frame buffer console, 800x600x32k"`"\ - "1024x768x32k" "`gettext "Frame buffer console, 1024x768x32k"`" \ - "640x480x256" "`gettext "Frame buffer console, 640x480x256"`" \ - "800x600x256" "`gettext "Frame buffer console, 800x600x256"`" \ - "1024x768x256" "`gettext "Frame buffer console, 1024x768x256"`" \ - 2> $TMP/reply - if [ $? = 1 -o $? = 255 ]; then - exit - fi -# Frame buffer modes above 1024x768 look terrible except -# on LCD panels, and 32 bit color is slow. Since we don't -# even need to run a framebuffer console to run framebuffer -# X anymore, these modes aren't of much real use. -# "1280x1024x256" "Frame buffer console, 1280x1024x256" \ -# "1600x1200x256" "Frame buffer console, 1600x1200x256" \ -# "1280x1024x32k" "Frame buffer console, 1280x1024x32k" \ -# "1600x1200x32k" "Frame buffer console, 1600x1200x32k" \ -# "1280x1024x64k" "Frame buffer console, 1280x1024x64k" \ -# "1600x1200x64k" "Frame buffer console, 1600x1200x64k" \ -# "640x480x16m" "Frame buffer console, 640x480x16.8m" \ -# "800x600x16m" "Frame buffer console, 800x600x16.8m" \ -# "1024x768x16m" "Frame buffer console, 1024x768x16.8m" \ -# "1280x1024x16m" "Frame buffer console, 1280x1024x16.8m" \ -# "1600x1200x16m" "Frame buffer console, 1600x1200x16.8m" - CONSOLETYPE="`cat $TMP/reply`" - if [ "$CONSOLETYPE" = "1600x1200x16m" ]; then - CONSOLENUM=799 - elif [ "$CONSOLETYPE" = "1600x1200x64k" ]; then - CONSOLENUM=798 - elif [ "$CONSOLETYPE" = "1600x1200x32k" ]; then - CONSOLENUM=797 - elif [ "$CONSOLETYPE" = "1600x1200x256" ]; then - CONSOLENUM=796 - elif [ "$CONSOLETYPE" = "1280x1024x16m" ]; then - CONSOLENUM=795 - elif [ "$CONSOLETYPE" = "1280x1024x64k" ]; then - CONSOLENUM=794 - elif [ "$CONSOLETYPE" = "1280x1024x32k" ]; then - CONSOLENUM=793 - elif [ "$CONSOLETYPE" = "1280x1024x256" ]; then - CONSOLENUM=775 - elif [ "$CONSOLETYPE" = "1024x768x16m" ]; then - CONSOLENUM=792 - elif [ "$CONSOLETYPE" = "1024x768x64k" ]; then - CONSOLENUM=791 - elif [ "$CONSOLETYPE" = "1024x768x32k" ]; then - CONSOLENUM=790 - elif [ "$CONSOLETYPE" = "1024x768x256" ]; then - CONSOLENUM=773 - elif [ "$CONSOLETYPE" = "800x600x16m" ]; then - CONSOLENUM=789 - elif [ "$CONSOLETYPE" = "800x600x64k" ]; then - CONSOLENUM=788 - elif [ "$CONSOLETYPE" = "800x600x32k" ]; then - CONSOLENUM=787 - elif [ "$CONSOLETYPE" = "800x600x256" ]; then - CONSOLENUM=771 - elif [ "$CONSOLETYPE" = "640x480x16m" ]; then - CONSOLENUM=786 - elif [ "$CONSOLETYPE" = "640x480x64k" ]; then - CONSOLENUM=785 - elif [ "$CONSOLETYPE" = "640x480x32k" ]; then - CONSOLENUM=784 - elif [ "$CONSOLETYPE" = "640x480x256" ]; then - CONSOLENUM=769 - fi + "standard" "`gettext "Use the standard Linux console (the safe choice)"`" \ + "ask" "`gettext "Ask about using VESA modes at boot; time out to standard"`" \ + "640x480x64k" "`gettext "Frame buffer console, 640x480x64k"`" \ + "800x600x64k" "`gettext "Frame buffer console, 800x600x64k"`" \ + "1024x768x64k" "`gettext "Frame buffer console, 1024x768x64k"`" \ + "640x480x32k" "`gettext "Frame buffer console, 640x480x32k"`" \ + "800x600x32k" "`gettext "Frame buffer console, 800x600x32k"`"\ + "1024x768x32k" "`gettext "Frame buffer console, 1024x768x32k"`" \ + "640x480x256" "`gettext "Frame buffer console, 640x480x256"`" \ + "800x600x256" "`gettext "Frame buffer console, 800x600x256"`" \ + "1024x768x256" "`gettext "Frame buffer console, 1024x768x256"`" \ + 2> $TMP/reply + if [ $? = 1 -o $? = 255 ]; then + exit + fi + CONSOLETYPE="`cat $TMP/reply`" + if [ "$CONSOLETYPE" = "1600x1200x16m" ]; then + CONSOLENUM=799 + elif [ "$CONSOLETYPE" = "1600x1200x64k" ]; then + CONSOLENUM=798 + elif [ "$CONSOLETYPE" = "1600x1200x32k" ]; then + CONSOLENUM=797 + elif [ "$CONSOLETYPE" = "1600x1200x256" ]; then + CONSOLENUM=796 + elif [ "$CONSOLETYPE" = "1280x1024x16m" ]; then + CONSOLENUM=795 + elif [ "$CONSOLETYPE" = "1280x1024x64k" ]; then + CONSOLENUM=794 + elif [ "$CONSOLETYPE" = "1280x1024x32k" ]; then + CONSOLENUM=793 + elif [ "$CONSOLETYPE" = "1280x1024x256" ]; then + CONSOLENUM=775 + elif [ "$CONSOLETYPE" = "1024x768x16m" ]; then + CONSOLENUM=792 + elif [ "$CONSOLETYPE" = "1024x768x64k" ]; then + CONSOLENUM=791 + elif [ "$CONSOLETYPE" = "1024x768x32k" ]; then + CONSOLENUM=790 + elif [ "$CONSOLETYPE" = "1024x768x256" ]; then + CONSOLENUM=773 + elif [ "$CONSOLETYPE" = "800x600x16m" ]; then + CONSOLENUM=789 + elif [ "$CONSOLETYPE" = "800x600x64k" ]; then + CONSOLENUM=788 + elif [ "$CONSOLETYPE" = "800x600x32k" ]; then + CONSOLENUM=787 + elif [ "$CONSOLETYPE" = "800x600x256" ]; then + CONSOLENUM=771 + elif [ "$CONSOLETYPE" = "640x480x16m" ]; then + CONSOLENUM=786 + elif [ "$CONSOLETYPE" = "640x480x64k" ]; then + CONSOLENUM=785 + elif [ "$CONSOLETYPE" = "640x480x32k" ]; then + CONSOLENUM=784 + elif [ "$CONSOLETYPE" = "640x480x256" ]; then + CONSOLENUM=769 + fi fi } - # A function to ask for append= parameters. ask_append() { - dialog --title "`gettext "OPTIONAL LILO append= LINE"`" --inputbox \ + dialog --title "`gettext "OPTIONAL LILO append= LINE"`" --inputbox \ "`gettext "Some systems might require extra parameters to be passed to the kernel. \ If you needed to pass parameters to the kernel when you booted the Slint \ bootdisk, you'll probably want to enter the same ones here. Most \ systems won't require any extra parameters. If you don't need any, just \ hit ENTER to continue. "`" 12 80 2> $TMP/reply - RETVAL=$? - return $RETVAL + RETVAL=$? + return $RETVAL } - -ask_utf() { - dialog --defaultno --title "`gettext "USE UTF-8 TEXT CONSOLE?"`" --yesno \ -"`gettext "Beginning with the 2.6.24 kernel, the text consoles default to UTF-8 mode. \ -Unless you are using a UTF-8 locale (\\$LANG setting), using the old default \ -of a non-UTF text console is safer until some issues with various console \ -programs are addressed. This option has no effect on the use of UTF-8 with X. \ -\"No\" is the safe choice here."`" 10 80 -} - # This function scans for bootable partitions (making some assumptions along # the way which may or may not be correct, but usually work), and sets up # LILO in either the superblock, or the MBR. -simplelilo() -{ - use_framebuffer; - ask_append; - if [ $? = 1 -o $? = 255 ]; then - APPEND="" - fi - APPEND="`cat $TMP/reply`" +simplelilo() { + use_framebuffer; + ask_append; + if [ $? = 1 -o $? = 255 ]; then + APPEND="" + fi + APPEND="`cat $TMP/reply`" dialog --visit-items --title "`eval_gettext "SELECT LILO DESTINATION"`" $DEFAULT --menu \ "`gettext "LILO can be installed to a variety of places: @@ -306,259 +279,214 @@ "Floppy" "`gettext "Install to a formatted floppy in /dev/fd0 (A:)"`" \ "MBR" "`gettext "Install to Master Boot Record"`" \ 2> $TMP/reply - if [ $? = 1 -o $? = 255 ]; then - exit - fi - TG="`cat $TMP/reply`" - rm -r $TMP/reply - if [ "$TG" = "MBR" ]; then - MBR_TARGET=/dev/sda - echo $MBR_TARGET > $TMP/LILOMBR - cat /proc/partitions | while read LINE ; do - MAJOR="`echo $LINE | cut -f 1 -d ' '`" - MINOR="`echo $LINE | cut -f 2 -d ' '`" - if [ ! "$MINOR" = "0" -a ! "$MINOR" = "64" ]; then # ignore whole devices to weed out CD drives - if [ "$MAJOR" = "3" ]; then - MBR_TARGET=/dev/hda - echo $MBR_TARGET > $TMP/LILOMBR - elif [ "$MAJOR" = "22" -a ! "$MBR_TARGET" = "/dev/hda" ]; then - MBR_TARGET=/dev/hdc - echo $MBR_TARGET > $TMP/LILOMBR - elif [ "$MAJOR" = "33" -a ! "$MBR_TARGET" = "/dev/hda" -a ! "$MBR_TARGET" = "/dev/hdc" ]; then - MBR_TARGET=/dev/hde - echo $MBR_TARGET > $TMP/LILOMBR - elif [ "$MAJOR" = "34" -a ! "$MBR_TARGET" = "/dev/hda" -a ! "$MBR_TARGET" = "/dev/hdc" -a ! "$MBR_TARGET" = "/dev/hde" ]; then - MBR_TARGET=/dev/hdg - echo $MBR_TARGET > $TMP/LILOMBR - fi - fi - done - LILO_TARGET=`cat $TMP/LILOMBR` - elif [ "$TG" = "Root" ]; then - LILO_TARGET=`echo $ROOT_DEVICE` - elif [ "$TG" = "Floppy" ]; then - LILO_TARGET="/dev/fd0" - fi - cat << EOF > $T_PX/etc/lilo.conf -# LILO configuration file -# generated by 'liloconfig' -# -# Start LILO global section -EOF - if [ ! "$APPEND" = "" -o ! "$UTFVT" = "" ]; then - echo "# Append any additional kernel parameters:" >> $T_PX/etc/lilo.conf - echo "append=\"$APPEND $UTFVT\"" >> $T_PX/etc/lilo.conf - fi - cat << EOF >> $T_PX/etc/lilo.conf -boot = $LILO_TARGET - -#compact # faster, but won't work on all systems. -EOF -# Blind users won't get a slash screen but will now that the boot loader -# is hearing the bell -# This works if brltty is started. - if [ "`ps -C brltty --noheaders|wc -l`" = "0" ]; then - boot_bmp >> $T_PX/etc/lilo.conf - cat << EOF >> $T_PX/etc/lilo.conf -# Standard menu. -# Or, you can comment out the bitmap menu above and -# use a boot message with the standard menu: -#message = /boot/boot_message.txt - -EOF - else - cat << EOF >> $T_PX/etc/lilo.conf -# Standard menu. -message = /boot/boot_message.txt - -EOF - fi - cat << EOF >> $T_PX/etc/lilo.conf -# Wait until the timeout to boot (if commented out, boot the -# first entry immediately): -prompt -# Timeout before the first entry boots. -# This is given in tenths of a second, so 600 for every minute: -timeout = 1200 -# Override dangerous defaults that rewrite the partition table: -change-rules - reset -EOF - if [ $CONSOLETYPE = standard ]; then - cat << EOF >> $T_PX/etc/lilo.conf -# Normal VGA console -vga = normal -# Ask for video mode at boot (time out to normal in 30s) -#vga = ask -EOF - elif [ $CONSOLETYPE = ask ]; then - cat << EOF >> $T_PX/etc/lilo.conf -# Ask for video mode at boot (time out to normal in 30s) -vga = ask -# Normal VGA console -#vga = normal -EOF - else - cat << EOF >> $T_PX/etc/lilo.conf -# VESA framebuffer console @ $CONSOLETYPE -vga = $CONSOLENUM -# Normal VGA console -#vga = normal -# Ask for video mode at boot (time out to normal in 30s) -#vga = ask -EOF - fi -cat << EOF >> $T_PX/etc/lilo.conf -# VESA framebuffer console @ 1024x768x64k -#vga=791 -# VESA framebuffer console @ 1024x768x32k -#vga=790 -# VESA framebuffer console @ 1024x768x256 -#vga=773 -# VESA framebuffer console @ 800x600x64k -#vga=788 -# VESA framebuffer console @ 800x600x32k -#vga=787 -# VESA framebuffer console @ 800x600x256 -#vga=771 -# VESA framebuffer console @ 640x480x64k -#vga=785 -# VESA framebuffer console @ 640x480x32k -#vga=784 -# VESA framebuffer console @ 640x480x256 -#vga=769 -EOF -cat << EOF >> $T_PX/etc/lilo.conf -# End LILO global section -EOF - # OK, now let's look for Windows partitions: - # If we have os-prober, use the Windows partition list from that: - if which os-prober > /dev/null ; then - DOSP="$(os-prober 2> /dev/null | grep Windows | cut -f 1 -d :)" - else # use PROBE output: - DOSP="$(PROBE -l | grep "DOS + if [ $? = 1 -o $? = 255 ]; then + exit + fi + TG="`cat $TMP/reply`" + rm -r $TMP/reply + if [ "$TG" = "MBR" ]; then + MBR_TARGET=/dev/sda + echo $MBR_TARGET > $TMP/LILOMBR + cat /proc/partitions | while read LINE ; do + MAJOR="`echo $LINE | cut -f 1 -d ' '`" + MINOR="`echo $LINE | cut -f 2 -d ' '`" + if [ ! "$MINOR" = "0" -a ! "$MINOR" = "64" ]; then # ignore whole devices to weed out CD drives + if [ "$MAJOR" = "3" ]; then + MBR_TARGET=/dev/hda + echo $MBR_TARGET > $TMP/LILOMBR + elif [ "$MAJOR" = "22" -a ! "$MBR_TARGET" = "/dev/hda" ]; then + MBR_TARGET=/dev/hdc + echo $MBR_TARGET > $TMP/LILOMBR + elif [ "$MAJOR" = "33" -a ! "$MBR_TARGET" = "/dev/hda" -a ! "$MBR_TARGET" = "/dev/hdc" ]; then + MBR_TARGET=/dev/hde + echo $MBR_TARGET > $TMP/LILOMBR + elif [ "$MAJOR" = "34" -a ! "$MBR_TARGET" = "/dev/hda" -a ! "$MBR_TARGET" = "/dev/hdc" -a ! "$MBR_TARGET" = "/dev/hde" ]; then + MBR_TARGET=/dev/hdg + echo $MBR_TARGET > $TMP/LILOMBR + fi + fi + done + LILO_TARGET=`cat $TMP/LILOMBR` + elif [ "$TG" = "Root" ]; then + LILO_TARGET=`echo $ROOT_DEVICE` + elif [ "$TG" = "Floppy" ]; then + LILO_TARGET="/dev/fd0" + fi + cat <<-EOF > $T_PX/etc/lilo.conf + # LILO configuration file + # generated by 'liloconfig' + # + # Start LILO global section + EOF + if [ ! "$APPEND" = "" -o ! "$UTFVT" = "" ]; then + echo "# Append any additional kernel parameters:" >> $T_PX/etc/lilo.conf + echo "append=\"$APPEND $UTFVT\"" >> $T_PX/etc/lilo.conf + fi + cat <<-EOF >> $T_PX/etc/lilo.conf + boot = $LILO_TARGET + #compact # faster, but won't work on all systems. + # Standard menu. + menu-scheme = wk:Wk:Kk:Wk + menu-title = "Choose a system then press Enter" + message = /boot/boot_message.txt + # Wait until the timeout to boot (if commented out, boot the + # first entry immediately): + prompt + # Timeout before the first entry boots. + # This is given in tenths of a second, so 600 for every minute: + timeout = 100 + # Override dangerous defaults that rewrite the partition table: + change-rules + reset + EOF + if [ $CONSOLETYPE = standard ]; then + cat <<-EOF >> $T_PX/etc/lilo.conf + # Normal VGA console + vga = normal + # Ask for video mode at boot (time out to normal in 30s) + #vga = ask + EOF + elif [ $CONSOLETYPE = ask ]; then + cat <<-EOF >> $T_PX/etc/lilo.conf + # Ask for video mode at boot (time out to normal in 30s) + vga = ask + # Normal VGA console + #vga = normal + EOF + else + cat <<-EOF >> $T_PX/etc/lilo.conf + # VESA framebuffer console @ $CONSOLETYPE + vga = $CONSOLENUM + # Normal VGA console + #vga = normal + # Ask for video mode at boot (time out to normal in 30s) + #vga = ask + EOF + fi + cat <<-EOF >> $T_PX/etc/lilo.conf + # VESA framebuffer console @ 1024x768x64k + #vga=791 + # VESA framebuffer console @ 1024x768x32k + #vga=790 + # VESA framebuffer console @ 1024x768x256 + #vga=773 + # VESA framebuffer console @ 800x600x64k + #vga=788 + # VESA framebuffer console @ 800x600x32k + #vga=787 + # VESA framebuffer console @ 800x600x256 + #vga=771 + # VESA framebuffer console @ 640x480x64k + #vga=785 + # VESA framebuffer console @ 640x480x32k + #vga=784 + # VESA framebuffer console @ 640x480x256 + #vga=769 + EOF + cat <<-EOF >> $T_PX/etc/lilo.conf + # End LILO global section + EOF + # OK, now let's look for Windows partitions: + # If we have os-prober, use the Windows partition list from that: + if which os-prober > /dev/null ; then + DOSP="$(os-prober 2> /dev/null | grep Windows | cut -f 1 -d :)" + else # use PROBE output: + DOSP="$(PROBE -l | grep "DOS Win W95 FAT12 FAT16 HPFS" | grep -v "Ext'd" | grep -v "Extend" | sort )" - DOSP="`echo $DOSP | cut -f 1 -d ' '`" - fi - if [ ! "$DOSP" = "" ]; then - TABLE="`echo $DOSP | cut -b1-8`" - cat << EOF >> $T_PX/etc/lilo.conf -# Windows bootable partition config begins -other = $DOSP - label = Windows - table = $TABLE -# Windows bootable partition config ends -EOF - echo "Windows - (Windows FAT/NTFS partition)" >> $T_PX/boot/boot_message.txt - fi - # Next, we search for Linux partitions: - LNXP="`PROBE -l | grep "Linux$"`" - LNXP="`echo $LNXP | cut -f 1 -d ' ' | sort`" - if [ ! "$LNXP" = "" ]; then - cat << EOF >> $T_PX/etc/lilo.conf -# Linux bootable partition config begins -image = $KERNEL - root = $ROOT_DEVICE - label = Linux - read-only -# Linux bootable partition config ends -EOF - echo "Linux - (Linux partition)" >> $T_PX/boot/boot_message.txt - fi - echo >> $T_PX/boot/boot_message.txt - # Done, now we must install lilo: - installcolor + DOSP="`echo $DOSP | cut -f 1 -d ' '`" + fi + if [ ! "$DOSP" = "" ]; then + TABLE="`echo $DOSP | cut -b1-8`" + cat <<-EOF >> $T_PX/etc/lilo.conf + # Windows bootable partition config begins + other = $DOSP + label = Windows + table = $TABLE + # Windows bootable partition config ends + EOF + fi + # Next, we search for Linux partitions: + LNXP="`PROBE -l | grep "Linux$"`" + LNXP="`echo $LNXP | cut -f 1 -d ' ' | sort`" + if [ ! "$LNXP" = "" ]; then + cat <<-EOF >> $T_PX/etc/lilo.conf + # Linux bootable partition config begins + image = $KERNEL + root = $ROOT_DEVICE + label = Linux + read-only + # Linux bootable partition config ends + EOF + + fi + # Done, now we must install lilo: + installcolor } checkp_text() { - if [ ! -r $1 ]; then - ArG1="$1" - echo - eval_gettext "I can't find a device named \$ArG1 !" - unset ArG1 - echo - echo - gettext "Are you sure you want to use this device name " - echo -n "[y]es, [n]o? " - read use_device; - if [ ! "$use_device" = "y" ]; then - return 1; - fi - return 0; - fi + if [ ! -r $1 ]; then + ArG1="$1" + echo + eval_gettext "I can't find a device named \$ArG1 !" + unset ArG1 + echo + echo + gettext "Are you sure you want to use this device name " + echo -n "[y]es, [n]o? " + read use_device; + if [ ! "$use_device" = "y" ]; then + return 1; + fi + return 0; + fi } checkp_dialog() { - if [ ! -r $1 ]; then - ArG1=$1 - dialog --title "`gettext "DEVICE FILE NOT FOUND"`" --yesno "`eval_gettext "I can't find a \ + if [ ! -r $1 ]; then + ArG1=$1 + dialog --title "`gettext "DEVICE FILE NOT FOUND"`" --yesno "`eval_gettext "I can't find a \ device named \"\\\$ArG1\". Are you sure you want to use this device \ name?"`" 7 80 - unset ArG1 - return $?; - fi -} - -checkbootsplash() -{ - if [ "$(uname -m)" = "x86_64" ]; then - if [ -r $LILODOCDIR/sample/slack64.bmp ]; then - cp -a $LILODOCDIR/sample/slack64.bmp /boot/image.bmp - fi - else - if [ -r $LILODOCDIR/sample/image.bmp ]; then - cp -a $LILODOCDIR/sample/image.bmp /boot/image.bmp - fi - fi - if [ -r $HOME/1337 ]; then - if [ -r $LILODOCDIR/sample/sl1337.bmp ]; then - cp -a $LILODOCDIR/sample/sl1337.bmp /boot/image.bmp - fi - fi - # Mayan calendar easter egg - if [ "$(date "+%Y%m%d")" = "20121221" ]; then - if [ -r $LILODOCDIR/sample/slack14.0.2012.bmp ]; then - cp -a $LILODOCDIR/sample/slack14.0.2012.bmp /boot/image.bmp - fi - fi -} - -installcolor() -{ - checkbootsplash; - dialog --infobox "`gettext "Installing the Linux Loader..."`" 5 80 - if [ "$T_PX" = "/" ]; then - lilo 1> /dev/null 2> /etc/lilo-error.$$ - SUCCESS=$? - else - lilo -r $T_PX -m /boot/map -C /etc/lilo.conf 1> /dev/null 2> /etc/lilo-error.$$ - SUCCESS=$? - fi - if [ ! "$SUCCESS" = "0" ]; then # edit file to try lba32 mode: - cat $T_PX/etc/lilo.conf | while read line ; do - echo $line - if [ "$line" = "# Start LILO global section" ] ; then - echo "lba32 # Allow booting past 1024th cylinder with a recent BIOS" - fi - done > $T_PX/etc/lilo.conf.lba32 - mv $T_PX/etc/lilo.conf.lba32 $T_PX/etc/lilo.conf - if [ "$T_PX" = "/" ]; then - lilo 1> /dev/null 2> /etc/lilo-error.$$ - SUCCESS=$? - else - lilo -r $T_PX -m /boot/map -C /etc/lilo.conf 1> /dev/null 2> /etc/lilo-error.$$ - SUCCESS=$? - fi - fi - sleep 1 - if [ ! "$SUCCESS" = "0" ]; then # some LILO error occured - echo >> /etc/lilo-error.$$ + unset ArG1 + return $?; + fi +} + +installcolor() { + cp -a $LILODOCDIR/sample/image.bmp /boot/image.bmp; + dialog --infobox "`gettext "Installing the Linux Loader..."`" 5 80 + if [ "$T_PX" = "/" ]; then + lilo 1> /dev/null 2> /etc/lilo-error.$$ + SUCCESS=$? + else + lilo -r $T_PX -m /boot/map -C /etc/lilo.conf 1> /dev/null 2> /etc/lilo-error.$$ + SUCCESS=$? + fi + if [ ! "$SUCCESS" = "0" ]; then # edit file to try lba32 mode: + cat $T_PX/etc/lilo.conf | while read line ; do + echo $line + if [ "$line" = "# Start LILO global section" ] ; then + echo "lba32 # Allow booting past 1024th cylinder with a recent BIOS" + fi + done > $T_PX/etc/lilo.conf.lba32 + mv $T_PX/etc/lilo.conf.lba32 $T_PX/etc/lilo.conf + if [ "$T_PX" = "/" ]; then + lilo 1> /dev/null 2> /etc/lilo-error.$$ + SUCCESS=$? + else + lilo -r $T_PX -m /boot/map -C /etc/lilo.conf 1> /dev/null 2> /etc/lilo-error.$$ + SUCCESS=$? + fi + fi + sleep 1 + if [ ! "$SUCCESS" = "0" ]; then # some LILO error occured + echo >> /etc/lilo-error.$$ eval_gettext "Sorry, but the attempt to install LILO has returned an error, so LILO \ has not been correctly installed. You'll have to use a bootdisk \ to start your \ @@ -566,115 +494,57 @@ editing the /etc/lilo.conf and reinstalling LILO manually. See the \ LILO man page and documentation in \$LILODOCDIR for more help. \ The error message may be seen above." >> /etc/lilo-error.$$ - dialog --msgbox "$(cat /etc/lilo-error.$$)" 0 0 - fi -} - -installtext() -{ - checkbootsplash; - echo "Installing the Linux Loader..." - if [ "$T_PX" = "/" ]; then - lilo - SUCCESS=$? - else - lilo -r $T_PX -m /boot/map -C /etc/lilo.conf - SUCCESS=$? - fi - if [ ! "$SUCCESS" = "0" ]; then # try lba32 mode: - cat $T_PX/etc/lilo.conf | while read line ; do - echo $line - if [ "$line" = "# Start LILO global section" ] ; then - echo "lba32 # Allow booting past 1024th cylinder with a recent BIOS" - fi - done > $T_PX/etc/lilo.conf.lba32 - mv $T_PX/etc/lilo.conf.lba32 $T_PX/etc/lilo.conf - if [ "$T_PX" = "/" ]; then - lilo 1> /dev/null 2> /dev/null - SUCCESS=$? - else - lilo -r $T_PX -m /boot/map -C /etc/lilo.conf 1> /dev/null 2> /dev/null - SUCCESS=$? - fi - fi - sleep 1 - if [ ! "$SUCCESS" = "0" ]; then # some LILO error occured - echo - eval_gettext "LILO INSTALL ERROR # \$SUCCESS - -Sorry, but the attempt to install LILO has returned an error, so LILO \ -has not been correctly installed. You'll have to use a bootdisk to \ -start your machine instead. It should still be possible to get LILO \ -working by editing the /etc/lilo.conf and reinstalling LILO manually. \ -See the LILO man page and documentation in \$LILODOCDIR for more \ -help." -echo -echo - - fi + dialog --msgbox "$(cat /etc/lilo-error.$$)" 0 0 + fi } # 'probe()' borrowed from LILO QuickInst. -probe() -{ - [ ! -z "`dd if=$1 bs=1 count=1 2>/dev/null | tr '\0' x`" ] - return +probe() { + [ ! -z "`dd if=$1 bs=1 count=1 2>/dev/null | tr '\0' x`" ] + return } +##### MAIN ##### # Figure out if we're installing from the hard drive if [ -r $TMP/SeTT_PX ]; then - T_PX="`cat $TMP/SeTT_PX`" + T_PX="`cat $TMP/SeTT_PX`" else - if [ "$T_PX" = "" -a ! "$1" = "" ]; then - T_PX=$1 - else - T_PX=/ - fi + if [ "$T_PX" = "" -a ! "$1" = "" ]; then + T_PX=$1 + else + T_PX=/ + fi fi -HDR="no" # this means the header section of /etc/lilo.conf has not yet - # been configured -LNX="no" # this means no Linux partition has been defined as bootable - # through LILO. Both of these must change to "yes" before LILO will - # install from this script. +HDR="no" # this means the header section of /etc/lilo.conf has not yet + # been configured +LNX="no" # this means no Linux partition has been defined as bootable + # through LILO. Both of these must change to "yes" before LILO will + # install from this script. # Determine the root partition (such as /dev/hda2) ROOT_DEVICE=$2 if [ "$ROOT_DEVICE" = "" ]; then - if [ -r $TMP/SeTrootdev ]; then - ROOT_DEVICE="`cat $TMP/SeTrootdev`" - else - ROOT_DEVICE="`mount | cut -f 1 -d " " | sed -n "1 p"`" - fi + if [ -r $TMP/SeTrootdev ]; then + ROOT_DEVICE="`cat $TMP/SeTrootdev`" + else + ROOT_DEVICE="`mount | cut -f 1 -d " " | sed -n "1 p"`" + fi fi # Figure out where the kernel is: ARCHTYPE=i386 if [ -r $T_PX/vmlinuz ]; then - KERNEL=/vmlinuz + KERNEL=/vmlinuz elif [ -r $T_PX/boot/vmlinuz ]; then - KERNEL=/boot/vmlinuz + KERNEL=/boot/vmlinuz elif [ -r $T_PX/usr/src/linux/arch/$ARCHTYPE/boot/bzImage ]; then - KERNEL=/usr/src/linux/arch/$ARCHTYPE/boot/bzImage + KERNEL=/usr/src/linux/arch/$ARCHTYPE/boot/bzImage elif [ -r $T_PX/usr/src/linux/arch/$ARCHTYPE/boot/zImage ]; then - KERNEL=/usr/src/linux/arch/$ARCHTYPE/boot/zImage + KERNEL=/usr/src/linux/arch/$ARCHTYPE/boot/zImage else - exit 99 # no kernel? guess you couldn't read. bye bye. + exit 99 # no kernel? guess you couldn't read. bye bye. fi - # If we're installing from the umsdos.gz rootdisk, suggest skipping LILO: - if [ ! "$T_PX" = "/" ]; then - if mount | grep " on /mnt " | grep umsdos 1> /dev/null 2> /dev/null ; then - dialog --title "`gettext "SKIP LILO CONFIGURATION? (RECOMMENDED)"`" --yesno "`gettext "Since \ -you are installing to a FAT partition, it's suggested that you do not \ -configure LILO at this time. (Instead, use your bootdisk. For booting \ -off the hard drive from MS-DOS, you can use Loadlin. You'll find \ -Loadlin on your hard drive in \LINUX\ROOT) Skip LILO configuration \ -(highly recommended)?"`" 10 80 - if [ $? = 0 ]; then - exit - fi - fi - fi - # OK, now let's see if we should automate things: - dialog --visit-items --title "`gettext "INSTALL LILO"`" --menu "`gettext "LILO (Linux Loader) is a generic \ +# OK, now let's see if we should automate things: +dialog --visit-items --title "`gettext "INSTALL LILO"`" --menu "`gettext "LILO (Linux Loader) is a generic \ boot loader. There's a simple installation which tries to automatically \ set up LILO to boot Linux (also Windows if found). For \ more advanced users, the expert option offers more control over the \ @@ -682,25 +552,27 @@ damage partitions if incorrectly installed), there's the third (safe) \ option, which is to skip installing LILO for now. You can always install \ it later with the 'liloconfig' command. Which option would you like?"`" \ - 18 80 3 \ - "simple" "`gettext "Try to install LILO automatically"`" \ - "expert" "`gettext "Use expert lilo.conf setup menu"`" \ - "skip" "`gettext "Do not install LILO"`" 2> $TMP/reply - if [ $? = 1 -o $? = 255 ]; then - exit - fi - REPLY="`cat $TMP/reply`" - rm -f $TMP/reply - if [ "$REPLY" = "skip" ]; then - exit - elif [ "$REPLY" = "simple" ]; then - # Do simple LILO setup - simplelilo - exit - fi - # drop through to last option: (use the expert menus) - while [ 0 ]; do - dialog --visit-items --title "`gettext "EXPERT LILO INSTALLATION"`" --menu \ +18 80 3 \ +"simple" "`gettext "Try to install LILO automatically"`" \ +"expert" "`gettext "Use expert lilo.conf setup menu"`" \ +"skip" "`gettext "Do not install LILO"`" 2> $TMP/reply +if [ $? = 1 -o $? = 255 ]; then + exit +fi +REPLY="`cat $TMP/reply`" +rm -f $TMP/reply +if [ "$REPLY" = "skip" ]; then + exit +elif [ "$REPLY" = "simple" ]; then + # Do simple LILO setup + simplelilo + exit +fi +##### EXPERT LILO INSTALLATION BEGINS HERE ##### +# drop through to last option: (use the expert menus) +# This is a loop that ends when the user chooses "Install" +while [ 0 ]; do + dialog --visit-items --title "`gettext "EXPERT LILO INSTALLATION"`" --menu \ "`gettext "This menu directs the creation of the LILO config file, lilo.conf. \ To install, you make a new LILO configuration file by creating a new header \ and then adding one or more bootable partitions to the file. Once you've done \ @@ -716,87 +588,90 @@ "Skip" "`gettext "Skip LILO installation and exit this menu"`" \ "View" "`gettext "View your current /etc/lilo.conf"`" \ "Help" "`gettext "Read the Linux Loader HELP file"`" 2> $TMP/reply - if [ $? = 1 -o $? = 255 ]; then - REPLY="Skip" - else - REPLY="`cat $TMP/reply`" - fi - rm -r $TMP/reply - if [ "$REPLY" = "Begin" ]; then - ask_append; - if [ $? = 1 -o $? = 255 ]; then - APPEND="" - HDR="no" - continue; - else - APPEND="`cat $TMP/reply`" - fi - #~ ask_utf; - #~ if [ $? = 1 -o $? = 255 ]; then - #~ UTFVT="vt.default_utf8=0" - #~ else - #~ UTFVT="vt.default_utf8=1" - #~ fi - use_framebuffer; - dialog --visit-items --title "`eval_gettext "SELECT LILO TARGET LOCATION"`" $DEFAULT --menu "`gettext "LILO can be installed \ -to a variety of places: \ -the superblock of your root Linux partition (which could then be made the \ -bootable partition with fdisk), a formatted floppy disk, \ -or the master boot record of your first hard drive. If you're using \ -a boot system such as Boot Manager, you should use the \"Root\" \ -selection. Please pick a target location:"`" 15 80 3 \ -"Root" "`gettext "Install to superblock (not for use with XFS)"`" \ -"Floppy" "`gettext "Use a formatted floppy disk in the boot drive"`" \ -"MBR" "`gettext "Use the Master Boot Record (possibly unsafe)"`" \ + if [ $? = 1 -o $? = 255 ]; then + REPLY="Skip" + else + REPLY="`cat $TMP/reply`" + fi + rm -r $TMP/reply +#### BEGIN + if [ "$REPLY" = "Begin" ]; then + ask_append; + if [ $? = 1 -o $? = 255 ]; then + APPEND="" + HDR="no" + continue; + else + APPEND="`cat $TMP/reply`" + fi + use_framebuffer; +### Target location? + dialog --visit-items --title "`eval_gettext "SELECT LILO DESTINATION"`" $DEFAULT --menu \ +"`gettext "LILO can be installed to a variety of places: + + 1. The superblock of your root Linux partition. (which could \ + be made the bootable partition with Windows or Linux fdisk, or \ + booted with a program like OS/2 Boot Manager) + 2. A formatted floppy disk. + 3. The Master Boot Record of your first hard drive. + +Options 1 and 2 are the safest, but option 1 does require a little \ +extra work later (setting the partition bootable with fdisk). \ +Which option would you like?"`" \ + 20 80 3 \ + "Root" "`gettext "Install to superblock (not for use with XFS)"`" \ + "Floppy" "`gettext "Install to a formatted floppy in /dev/fd0 (A:)"`" \ + "MBR" "`gettext "Install to Master Boot Record"`" \ 2> $TMP/reply - if [ $? = 1 -o $? = 255 ]; then - HDR="no" - continue; - else - LNX="no" - TG="`cat $TMP/reply`" - fi - rm -r $TMP/reply - if [ "$TG" = "MBR" ]; then - MBR_TARGET=/dev/sda - echo $MBR_TARGET > $TMP/LILOMBR - cat /proc/partitions | while read LINE ; do - MAJOR="`echo $LINE | cut -f 1 -d ' '`" - MINOR="`echo $LINE | cut -f 2 -d ' '`" - if [ ! "$MINOR" = "0" -a ! "$MINOR" = "64" ]; then # ignore whole devices to weed out CD drives - if [ "$MAJOR" = "3" ]; then - MBR_TARGET=/dev/hda - echo $MBR_TARGET > $TMP/LILOMBR - elif [ "$MAJOR" = "22" -a ! "$MBR_TARGET" = "/dev/hda" ]; then - MBR_TARGET=/dev/hdc - echo $MBR_TARGET > $TMP/LILOMBR - elif [ "$MAJOR" = "33" -a ! "$MBR_TARGET" = "/dev/hda" -a ! "$MBR_TARGET" = "/dev/hdc" ]; then - MBR_TARGET=/dev/hde - echo $MBR_TARGET > $TMP/LILOMBR - elif [ "$MAJOR" = "34" -a ! "$MBR_TARGET" = "/dev/hda" -a ! "$MBR_TARGET" = "/dev/hdc" -a ! "$MBR_TARGET" = "/dev/hde" ]; then - MBR_TARGET=/dev/hdg - echo $MBR_TARGET > $TMP/LILOMBR - fi - fi - done - LILO_TARGET=`cat $TMP/LILOMBR` - dialog --title "`gettext "CONFIRM LOCATION TO INSTALL LILO"`" --inputbox \ + if [ $? = 1 -o $? = 255 ]; then + HDR="no" + continue; + else + LNX="no" + TG="`cat $TMP/reply`" + fi + rm -r $TMP/reply + if [ "$TG" = "MBR" ]; then + MBR_TARGET=/dev/sda + echo $MBR_TARGET > $TMP/LILOMBR + cat /proc/partitions | while read LINE ; do + MAJOR="`echo $LINE | cut -f 1 -d ' '`" + MINOR="`echo $LINE | cut -f 2 -d ' '`" + if [ ! "$MINOR" = "0" -a ! "$MINOR" = "64" ]; then # ignore whole devices to weed out CD drives + if [ "$MAJOR" = "3" ]; then + MBR_TARGET=/dev/hda + echo $MBR_TARGET > $TMP/LILOMBR + elif [ "$MAJOR" = "22" -a ! "$MBR_TARGET" = "/dev/hda" ]; then + MBR_TARGET=/dev/hdc + echo $MBR_TARGET > $TMP/LILOMBR + elif [ "$MAJOR" = "33" -a ! "$MBR_TARGET" = "/dev/hda" -a ! "$MBR_TARGET" = "/dev/hdc" ]; then + MBR_TARGET=/dev/hde + echo $MBR_TARGET > $TMP/LILOMBR + elif [ "$MAJOR" = "34" -a ! "$MBR_TARGET" = "/dev/hda" -a ! "$MBR_TARGET" = "/dev/hdc" -a ! "$MBR_TARGET" = "/dev/hde" ]; then + MBR_TARGET=/dev/hdg + echo $MBR_TARGET > $TMP/LILOMBR + fi + fi + done + LILO_TARGET=`cat $TMP/LILOMBR` + dialog --title "`gettext "CONFIRM LOCATION TO INSTALL LILO"`" --inputbox \ "`gettext "The auto-detected location to install the LILO boot block is shown below. \ If you need to make any changes, you can make them below. Otherwise, hit \ ENTER to accept the target location shown."`" 11 80 $LILO_TARGET 2> $TMP/reply - if [ $? = 0 ]; then - LILO_TARGET="`cat $TMP/reply`" - fi - rm -f $TMP/reply - elif [ "$TG" = "Root" ]; then - LILO_TARGET=`echo $ROOT_DEVICE` - elif [ "$TG" = "Floppy" ]; then - LILO_TARGET="/dev/fd0" - else - HDR="no" - continue; - fi - dialog --visit-items --title "`gettext "CHOOSE LILO TIMEOUT"`" --menu "`gettext "At boot time, how long would \ + if [ $? = 0 ]; then + LILO_TARGET="`cat $TMP/reply`" + fi + rm -f $TMP/reply + elif [ "$TG" = "Root" ]; then + LILO_TARGET=`echo $ROOT_DEVICE` + elif [ "$TG" = "Floppy" ]; then + LILO_TARGET="/dev/fd0" + else + HDR="no" + continue; + fi +### Timeout? + dialog --visit-items --title "`gettext "CHOOSE LILO TIMEOUT"`" --menu "`gettext "At boot time, how long would \ you like LILO to wait for you to select an operating system? If you \ let LILO time out, it will boot the first OS in the configuration file by \ default."`" 13 80 4 \ @@ -804,357 +679,302 @@ "5" "`gettext "5 seconds"`" \ "30" "`gettext "30 seconds"`" \ "Forever" "`gettext "Present a prompt and wait until a choice is made"`" 2> $TMP/reply - if [ $? = 1 -o $? = 255 ]; then - HDR="no" - continue; - else - TIMEOUT="`cat $TMP/reply`" - fi - rm -r $TMP/reply - if [ "$TIMEOUT" = "None" ]; then - PROMPT="#prompt" - TIMEOUT="#timeout = 5" - elif [ "$TIMEOUT" = "5" ]; then - PROMPT="prompt" - TIMEOUT="timeout = 50" - elif [ "$TIMEOUT" = "30" ]; then - PROMPT="prompt" - TIMEOUT="timeout = 300" - elif [ "$TIMEOUT" = "Forever" ]; then - PROMPT="prompt" - TIMEOUT="#timeout = 300" - else - HDR="no" - continue; - fi - cat << EOF > $TMP/lilo.conf -# LILO configuration file -# generated by 'liloconfig' -# -# Start LILO global section -boot = $LILO_TARGET - -#compact # faster, but won't work on all systems. - -EOF - # Boot splash - if [ "$PROMPT" = "prompt" ] && [ "`ps -C brltty --noheaders|wc -l`" = "0" ]; then - if ask_boot_splash ; then - boot_bmp >> $TMP/lilo.conf - cat << EOF >> $TMP/lilo.conf -# Standard menu. -# Or, you can comment out the bitmap menu above and -# use a boot message with the standard menu: -#message = /boot/boot_message.txt - -EOF - fi - else - cat << EOF >> $TMP/lilo.conf -# Standard menu. -message = /boot/boot_message.txt - -EOF - fi - if [ ! "$APPEND" = "" -o ! "$UTFVT" = "" ]; then - echo "# Append any additional kernel parameters:" >> $TMP/lilo.conf - echo "append=\"$APPEND $UTFVT\"" >> $TMP/lilo.conf - fi - cat << EOF >> $TMP/lilo.conf -$PROMPT -$TIMEOUT -EOF - if [ "$CONSOLETYPE" = "standard" ]; then - cat << EOF >> $TMP/lilo.conf -# Normal VGA console -vga = normal -# Ask for video mode at boot (time out to normal in 30s) -#vga = ask -EOF - elif [ "$CONSOLETYPE" = "ask" ]; then - cat << EOF >> $TMP/lilo.conf -# Ask for video mode at boot (time out to normal in 30s) -vga = ask -# Normal VGA console -#vga = normal -EOF - else - cat << EOF >> $TMP/lilo.conf -# VESA framebuffer console @ $CONSOLETYPE -vga = $CONSOLENUM -# Normal VGA console -#vga = normal -# Ask for video mode at boot (time out to normal in 30s) -#vga = ask -EOF - fi - cat << EOF >> $TMP/lilo.conf -# VESA framebuffer console @ 1024x768x64k -# vga=791 -# VESA framebuffer console @ 1024x768x32k -# vga=790 -# VESA framebuffer console @ 1024x768x256 -# vga=773 -# VESA framebuffer console @ 800x600x64k -# vga=788 -# VESA framebuffer console @ 800x600x32k -# vga=787 -# VESA framebuffer console @ 800x600x256 -# vga=771 -# VESA framebuffer console @ 640x480x64k -# vga=785 -# VESA framebuffer console @ 640x480x32k -# vga=784 -# VESA framebuffer console @ 640x480x256 -# vga=769 -EOF - cat << EOF >> $TMP/lilo.conf -# ramdisk = 0 # paranoia setting -# End LILO global section -EOF - HDR="yes" - elif [ "$REPLY" = "Linux" ]; then - if [ "$HDR" = "yes" ]; then - if [ "$ROOT_DEVICE" != "" ]; then - DEFROOT="--default-item $ROOT_DEVICE" - fi - echo -n 'dialog --visit-items --title "' > $TMP/tmpmsg - eval_gettext "SELECT LINUX PARTITION \$DEFROOT" >> $TMP/tmpmsg - echo -n '" --menu "' >> $TMP/tmpmsg - gettext "Which Linux partition would you like LILO to boot?" >> $TMP/tmpmsg - echo "\n\\" >> $TMP/tmpmsg - echo "\n\\" >> $TMP/tmpmsg - echo -n ' Partition Start End Sectors ID" ' >> $TMP/tmpmsg - echo -n ' 22 80 13 ' >> $TMP/tmpmsg - LANG=C PROBE -l 2> /dev/null | grep "Linux$" | sort | while read STR; do - STR1="$(echo -n "$STR" | cut -f 1 -d ' ')" - STR2="$(echo -n "$STR" | cut -f 2- -d ' ')" - echo "\"$STR1\" \"$STR2\" \\" >> $TMP/tmpmsg - done - echo "2> $TMP/reply" >> $TMP/tmpmsg - . $TMP/tmpmsg - if [ $? = 1 -o $? = 255 ]; then - rm $TMP/tmpmsg - continue - fi - rm $TMP/tmpmsg - LINUX_PART="`cat $TMP/reply`" - checkp_dialog $LINUX_PART - if [ ! $? = 0 ]; then - continue; - fi - dialog --title "`eval_gettext "SELECT PARTITION NAME FOR \\\$LINUX_PART"`" --inputbox \ + if [ $? = 1 -o $? = 255 ]; then + HDR="no" + continue; + else + TIMEOUT="`cat $TMP/reply`" + fi + rm -r $TMP/reply + if [ "$TIMEOUT" = "None" ]; then + PROMPT="#prompt" + TIMEOUT="#timeout = 5" + elif [ "$TIMEOUT" = "5" ]; then + PROMPT="prompt" + TIMEOUT="timeout = 50" + elif [ "$TIMEOUT" = "30" ]; then + PROMPT="prompt" + TIMEOUT="timeout = 300" + elif [ "$TIMEOUT" = "Forever" ]; then + PROMPT="prompt" + TIMEOUT="#timeout = 300" + else + HDR="no" + continue; + fi + cat <<-EOF > $TMP/lilo.conf + # LILO configuration file + # generated by 'liloconfig' + # + # Start LILO global section + boot = $LILO_TARGET + + #compact # faster, but won't work on all systems. + + EOF +### Boot splash? (if a timeout is set) + # Boot splash + if [ "$PROMPT" = "prompt" ]; then + if ask_boot_splash ; then + boot_bmp >> $TMP/lilo.conf + cat <<-EOF >> $TMP/lilo.conf + # Standard menu. + # Or, you can comment out the bitmap menu above and + # use a boot message with the standard menu: + #message = /boot/boot_message.txt + + EOF + fi + else + cat-<<-EOF >> $TMP/lilo.conf + # Standard menu. + message = /boot/boot_message.txt + + EOF + fi +### Append kernel parameters ? + if [ ! "$APPEND" = "" -o ! "$UTFVT" = "" ]; then + echo "# Append any additional kernel parameters:" >> $TMP/lilo.conf + echo "append=\"$APPEND $UTFVT\"" >> $TMP/lilo.conf + fi + cat <<-EOF >> $TMP/lilo.conf + $PROMPT + $TIMEOUT + EOF + if [ "$CONSOLETYPE" = "standard" ]; then + cat <<-EOF >> $TMP/lilo.conf + # Normal VGA console + vga = normal + # Ask for video mode at boot (time out to normal in 30s) + #vga = ask + EOF + elif [ "$CONSOLETYPE" = "ask" ]; then + cat <<-EOF >> $TMP/lilo.conf + # Ask for video mode at boot (time out to normal in 30s) + vga = ask + # Normal VGA console + #vga = normal + EOF + else + cat <<-EOF >> $TMP/lilo.conf + # VESA framebuffer console @ $CONSOLETYPE + vga = $CONSOLENUM + # Normal VGA console + #vga = normal + # Ask for video mode at boot (time out to normal in 30s) + #vga = ask + EOF + fi + cat <<-EOF >> $TMP/lilo.conf + # VESA framebuffer console @ 1024x768x64k + # vga=791 + # VESA framebuffer console @ 1024x768x32k + # vga=790 + # VESA framebuffer console @ 1024x768x256 + # vga=773 + # VESA framebuffer console @ 800x600x64k + # vga=788 + # VESA framebuffer console @ 800x600x32k + # vga=787 + # VESA framebuffer console @ 800x600x256 + # vga=771 + # VESA framebuffer console @ 640x480x64k + # vga=785 + # VESA framebuffer console @ 640x480x32k + # vga=784 + # VESA framebuffer console @ 640x480x256 + # vga=769 + EOF + cat <<-EOF >> $TMP/lilo.conf + # ramdisk = 0 # paranoia setting + # End LILO global section + EOF + HDR="yes" +#### REPLY=LINUX + elif [ "$REPLY" = "Linux" ]; then + if [ "$HDR" = "yes" ]; then + if [ "$ROOT_DEVICE" != "" ]; then + DEFROOT="--default-item $ROOT_DEVICE" + fi + echo -n 'dialog --visit-items --title "' > $TMP/tmpmsg + eval_gettext "SELECT LINUX PARTITION \$DEFROOT" >> $TMP/tmpmsg + echo -n '" --menu "' >> $TMP/tmpmsg + gettext "Which Linux partition would you like LILO to boot?" >> $TMP/tmpmsg + echo "\n\\" >> $TMP/tmpmsg + echo "\n\\" >> $TMP/tmpmsg + echo -n ' Partition Start End Sectors ID" ' >> $TMP/tmpmsg + echo -n ' 22 80 13 ' >> $TMP/tmpmsg + LANG=C PROBE -l 2> /dev/null | grep "Linux$" | sort | while read STR; do + STR1="$(echo -n "$STR" | cut -f 1 -d ' ')" + STR2="$(echo -n "$STR" | cut -f 2- -d ' ')" + echo "\"$STR1\" \"$STR2\" \\" >> $TMP/tmpmsg + done + echo "2> $TMP/reply" >> $TMP/tmpmsg + . $TMP/tmpmsg + if [ $? = 1 -o $? = 255 ]; then + rm $TMP/tmpmsg + continue + fi + rm $TMP/tmpmsg + LINUX_PART="`cat $TMP/reply`" + checkp_dialog $LINUX_PART + if [ ! $? = 0 ]; then + continue; + fi + dialog --title "`eval_gettext "SELECT PARTITION NAME FOR \\\$LINUX_PART"`" --inputbox \ "`gettext "Now you must select a short, unique name for this partition. \ You'll use this name if you specify a partition to boot at the \ LILO prompt. 'Linux' might not be a bad choice. THIS MUST BE A \ SINGLE WORD."`" 11 80 2> $TMP/reply - if [ $? = 1 -o $? = 255 ]; then - continue - fi - LABEL="`cat $TMP/reply`" - cat << EOF >> $TMP/lilo.conf -# Linux bootable partition config begins -image = $KERNEL - root = $LINUX_PART - label = $LABEL - read-only # Partitions should be mounted read-only for checking -# Linux bootable partition config ends -EOF - else - dialog --title "CAN'T ADD LINUX PARTITION" --msgbox "You can't add \ + if [ $? = 1 -o $? = 255 ]; then + continue + fi + LABEL="`cat $TMP/reply`" + cat <<-EOF >> $TMP/lilo.conf + # Linux bootable partition config begins + image = $KERNEL + root = $LINUX_PART + label = $LABEL + read-only # Partitions should be mounted read-only for checking + # Linux bootable partition config ends + EOF + else + dialog --title "CAN'T ADD LINUX PARTITION" --msgbox "You can't add \ partitions unless you start over with a new LILO header." 6 80 - continue - fi - LNX="yes" - # MORE OS/2 DEAD CODE... DOESN'T HURT. - # THIS ITEM HAS LONG BEEN REMOVED FROM THE MENU... - elif [ "$REPLY" = "OS/2" ]; then - if [ "$HDR" = "yes" ]; then - gettext "These are possibly OS/2 partitions. They will be treated \ + continue + fi + LNX="yes" +#### REPLY= Windows + elif [ "$REPLY" = "Windows" ]; then + if [ "$HDR" = "yes" ]; then + gettext "These are possibly Windows or DOS partitions. They will be treated as such if you install them using this menu." > $TMP/tmpmsg - echo "\n\\" >> $TMP/tmpmsg - echo "\n\\" >> $TMP/tmpmsg - echo " Device Boot Start End Blocks Id System" >> $TMP/tmpmsg - PROBE -l | grep DOS | sort >> $TMP/tmpmsg - PROBE -l | grep HPFS | sort >> $TMP/tmpmsg - echo >> $TMP/tmpmsg - gettext "Which one would you like LILO to boot?" >> $TMP/tmpmsg - echo >> $TMP/tmpmsg - dialog --title "`gettext "SELECT OS/2 PARTITION"`" --no-collapse --inputbox \ -"`cat $TMP/tmpmsg`" 20 80 2> $TMP/reply - if [ $? = 1 -o $? = 255 ]; then - rm $TMP/tmpmsg - continue - fi - rm $TMP/tmpmsg - OS_2_PART="`cat $TMP/reply`" - checkp_dialog $OS_2_PART - if [ ! $? = 0 ]; then - continue; - fi - dialog --title "`gettext "SELECT PARTITION NAME"`" --inputbox \ -"`gettext "Now you must select a short, unique name for this partition. \ -You'll use this name if you specify a partition to boot at the \ -LILO prompt. 'OS/2' might not be a bad choice. THIS MUST BE A \ -SINGLE WORD."`" 11 80 2> $TMP/reply - if [ $? = 1 -o $? = 255 ]; then - continue - fi - LABEL="`cat $TMP/reply`" - TABLE="`echo $OS_2_PART | cut -b1-8`" - if [ "`echo $TABLE | cut -b6-8`" = "hda" ]; then - cat << EOF >> $TMP/lilo.conf -# OS/2 bootable partition config begins -other = $OS_2_PART - label = $LABEL - table = $TABLE -# OS/2 bootable partition config ends -EOF - else - cat << EOF >> $TMP/lilo.conf -# OS/2 bootable partition config begins -other = $OS_2_PART - label = $LABEL - table = $TABLE - loader = /boot/os2_d.b -# map-drive = 0x80 -# to = 0x81 -# map-drive = 0x81 -# to = 0x80 -# OS/2 bootable partition config ends -EOF - fi - else - dialog --title "`gettext "CAN'T ADD OS/2 PARTITION"`" --msgbox "`gettext "You can't add \ -partitions unless you start over with a new LILO header."`" 6 80 - continue - fi - LNX="yes" - elif [ "$REPLY" = "Windows" ]; then - if [ "$HDR" = "yes" ]; then - gettext "These are possibly Windows or DOS partitions. They will be treated -as such if you install them using this menu." > $TMP/tmpmsg - echo >> $TMP/tmpmsg - echo >> $TMP/tmpmsg - echo " Device Boot Start End Blocks Id System" >> $TMP/tmpmsg - PROBE -l | grep "DOS + echo >> $TMP/tmpmsg + echo >> $TMP/tmpmsg + echo " Device Boot Start End Blocks Id System" >> $TMP/tmpmsg + PROBE -l | grep "DOS Win W95 FAT12 FAT16 HPFS" | grep -v "Ext'd" | grep -v "Extend" | sort | grep "$($OSPROBER 2> /dev/null | grep Windows | cut -f 1 -d :)" >> $TMP/tmpmsg - echo >> $TMP/tmpmsg - gettext "Which one would you like LILO to boot?" >> $TMP/tmpmsg - echo >> $TMP/tmpmsg - dialog --title "`gettext "SELECT WINDOWS PARTITION"`" --no-collapse --inputbox \ + echo >> $TMP/tmpmsg + gettext "Which one would you like LILO to boot?" >> $TMP/tmpmsg + echo >> $TMP/tmpmsg + dialog --title "`gettext "SELECT WINDOWS PARTITION"`" --no-collapse --inputbox \ "`cat $TMP/tmpmsg`" 20 80 2> $TMP/reply - if [ $? = 1 -o $? = 255 ]; then - rm $TMP/tmpmsg - continue - fi - rm $TMP/tmpmsg - DOSPART="`cat $TMP/reply`" - checkp_dialog $DOSPART - if [ ! $? = 0 ]; then - continue; - fi - dialog --title "`gettext "SELECT PARTITION NAME"`" --inputbox \ + if [ $? = 1 -o $? = 255 ]; then + rm $TMP/tmpmsg + continue + fi + rm $TMP/tmpmsg + DOSPART="`cat $TMP/reply`" + checkp_dialog $DOSPART + if [ ! $? = 0 ]; then + continue; + fi + dialog --title "`gettext "SELECT PARTITION NAME"`" --inputbox \ "`gettext "Now you must select a short, unique name for this partition. \ You'll use this name if you specify a partition to boot at the \ LILO prompt. 'Windows' might not be a bad choice. THIS MUST BE A \ SINGLE WORD."`" 11 80 2> $TMP/reply - if [ $? = 1 -o $? = 255 ]; then - continue - fi - LABEL="`cat $TMP/reply`" - unset USE_LOADER - TABLE="`echo $DOSPART | cut -b1-8`" - if [ "`echo $TABLE | cut -b6-8`" = "hda" ]; then - USE_LOADER="no" - fi - if [ "`echo $TABLE | cut -b6-8`" = "sda" ]; then - if probe /dev/hda; then - USE_LOADER="yes" - else - USE_LOADER="no" - fi - fi - if [ "$USE_LOADER" = "no" ]; then - cat << EOF >> $TMP/lilo.conf -# Windows bootable partition config begins -other = $DOSPART - label = $LABEL - table = $TABLE -# Windows bootable partition config ends -EOF - else - cat << EOF >> $TMP/lilo.conf -# Windows bootable partition config begins -other = $DOSPART - label = $LABEL -# map-drive = 0x80 -# to = 0x81 -# map-drive = 0x81 -# to = 0x80 - table = $TABLE -# Windows bootable partition config ends -EOF - fi - else - dialog --title "`gettext "CAN'T ADD WINDOWS PARTITION"`" --msgbox "`gettext "You can't add \ + if [ $? = 1 -o $? = 255 ]; then + continue + fi + LABEL="`cat $TMP/reply`" + unset USE_LOADER + TABLE="`echo $DOSPART | cut -b1-8`" + if [ "`echo $TABLE | cut -b6-8`" = "hda" ]; then + USE_LOADER="no" + fi + if [ "`echo $TABLE | cut -b6-8`" = "sda" ]; then + if probe /dev/hda; then + USE_LOADER="yes" + else + USE_LOADER="no" + fi + fi + if [ "$USE_LOADER" = "no" ]; then + cat <<-EOF >> $TMP/lilo.conf + # Windows bootable partition config begins + other = $DOSPART + label = $LABEL + table = $TABLE + # Windows bootable partition config ends + EOF + else + cat <<-EOF >> $TMP/lilo.conf + # Windows bootable partition config begins + other = $DOSPART + label = $LABEL + # map-drive = 0x80 + # to = 0x81 + # map-drive = 0x81 + # to = 0x80 + table = $TABLE + # Windows bootable partition config ends + EOF + fi + else + dialog --title "`gettext "CAN'T ADD WINDOWS PARTITION"`" --msgbox "`gettext "You can't add \ partitions unless you start over with a new LILO header."`" 6 80 - continue - fi - LNX="yes" - elif [ "$REPLY" = "Install" -o "$REPLY" = "Recycle" ]; then - if [ "$REPLY" = "Recycle" -a -r $T_PX/etc/lilo.conf ]; then - LNX="yes" - fi - if [ "$LNX" = "no" ]; then - dialog --title "`gettext "CAN'T INSTALL LILO"`" --msgbox "`gettext "LILO could not be \ + continue + fi + LNX="yes" +#### REPLY = Install or REPLY = Recycle + elif [ "$REPLY" = "Install" -o "$REPLY" = "Recycle" ]; then +#### Reply = Recycle + if [ "$REPLY" = "Recycle" -a -r $T_PX/etc/lilo.conf ]; then + LNX="yes" + fi + if [ "$LNX" = "no" ]; then + dialog --title "`gettext "CAN'T INSTALL LILO"`" --msgbox "`gettext "LILO could not be \ installed. If you have not created a LILO configuration file by defining \ a new header and adding at least one bootable partition to it, you must do \ so before installing LILO. If you were attempting to use an existing LILO \ -configuration file, it could not be found. Try making a new one."`" 9 80 - continue - else - if [ "$REPLY" = "Install" ]; then - if [ -r $TMP/lilo.conf ]; then - if [ -r $T_PX/etc/lilo.conf ]; then - mv $T_PX/etc/lilo.conf $T_PX/etc/lilo.conf.bak - fi - cp $TMP/lilo.conf $T_PX/etc/lilo.conf - chmod 644 $T_PX/etc/lilo.conf - fi - fi - installcolor; - fi - rm -f $TMP/tmpmsg $TMP/reply - break - elif [ "$REPLY" = "Skip" ]; then - rm -f $TMP/tmpmsg $TMP/reply - break - elif [ "$REPLY" = "View" ]; then - if [ -r $TMP/lilo.conf ]; then - dialog --title "`gettext "YOUR NEW /etc/lilo.conf"`" --textbox "$TMP/lilo.conf" 22 80 - else - if [ -r /mnt/etc/lilo.conf ]; then - dialog --title "`gettext "YOUR OLD /etc/lilo.conf"`" --textbox "/mnt/etc/lilo.conf" 22 80 - elif [ "$T_PX" = "/" -a -r /etc/lilo.conf ]; then - dialog --title "`gettext "YOUR OLD /etc/lilo.conf"`" --textbox "/etc/lilo.conf" 22 80 - else - dialog --title "`gettext "NO CONFIG FILE FOUND"`" --msgbox "`gettext "Sorry, but you don't \ +confguration file, it could not be found. Try making a new one."`" 9 80 + continue + else +#### REPLY = Install + if [ "$REPLY" = "Install" ]; then + if [ -r $TMP/lilo.conf ]; then + if [ -r $T_PX/etc/lilo.conf ]; then + mv $T_PX/etc/lilo.conf $T_PX/etc/lilo.conf.bak + fi + cp $TMP/lilo.conf $T_PX/etc/lilo.conf + chmod 644 $T_PX/etc/lilo.conf + fi + fi + installcolor; + fi + rm -f $TMP/tmpmsg $TMP/reply + break +#### REPLY= Skip + elif [ "$REPLY" = "Skip" ]; then + rm -f $TMP/tmpmsg $TMP/reply + break +#### REPLY= View + elif [ "$REPLY" = "View" ]; then + if [ -r $TMP/lilo.conf ]; then + dialog --title "`gettext "YOUR NEW /etc/lilo.conf"`" --textbox "$TMP/lilo.conf" 22 80 + else + if [ -r /mnt/etc/lilo.conf ]; then + dialog --title "`gettext "YOUR OLD /etc/lilo.conf"`" --textbox "/mnt/etc/lilo.conf" 22 80 + elif [ "$T_PX" = "/" -a -r /etc/lilo.conf ]; then + dialog --title "`gettext "YOUR OLD /etc/lilo.conf"`" --textbox "/etc/lilo.conf" 22 80 + else + dialog --title "`gettext "NO CONFIG FILE FOUND"`" --msgbox "`gettext "Sorry, but you don't \ have a LILO configuration file that can be viewed."`" 6 80 - fi - fi - elif [ "$REPLY" = "Help" ]; then - # to internationalize text.lilohelp - Didier Spaier - if [ -f /usr/lib/config/display.lilohelp ]; then - /usr/lib/config/display.lilohelp - else - $T_PX/var/log/setup/display.lilohelp - fi + fi + fi +#### REPLY = Help + elif [ "$REPLY" = "Help" ]; then + # to internationalize text.lilohelp - Didier Spaier + if [ -f /usr/lib/config/display.lilohelp ]; then + /usr/lib/config/display.lilohelp + else + $T_PX/var/log/setup/display.lilohelp + fi # dialog --title "LILO INSTALLATION HELP" --textbox "$T_PX/var/log/setup/text.lilohelp" 22 80 - fi - done - + fi +done diff -ru /home/didier/Slint/repo/x86_64/slint-14.2/source/localization/scripts/netconfig /home/didier/Slint/repo/x86_64/slint-14.2.1/next/source/localization/scripts/netconfig --- /home/didier/Slint/repo/x86_64/slint-14.2/source/localization/scripts/netconfig 2016-12-02 11:19:24.000000000 +0100 +++ /home/didier/Slint/repo/x86_64/slint-14.2.1/next/source/localization/scripts/netconfig 2017-09-04 14:06:49.833057000 +0200 @@ -3,6 +3,13 @@ # Mostly written by Patrick Volkerding . # Modified to use /etc/rc.d/rc.inet1.conf Tue Aug 26 16:51:48 PDT 2003 export TEXTDOMAIN=slint +if [ -f /tmp/.SlintInstallationLANG ]; then + LANG=$( /dev/null 2> /dev/null ; then # SERIAL_CONSOLE="true" @@ -80,13 +82,10 @@ fi # End Run udev: -# Start brltty if requested in the command line - Didier Spaier -if grep -wq brltty /proc/cmdline; then - echo "starting brltty" - sleep 3 - /bin/brltty - sleep 2 -fi +# Start brltty unconditionally - Didier Spaier +echo "starting brltty" +/bin/brltty +sleep 2 touch /.today /bin/sh /sbin/fakedate @@ -148,9 +147,104 @@ kbd_stored="`cat /tmp/Pkeymap`" kbd=${kbd_stored%.*} -echo -echo -sleep 5 +echo "We will now probe your sound cards." +echo "Please wait until you hear an alarm sound, then press Enter". +rm -f workingcard +sleep 3 +for card in $(sed -n "/^ [[:digit:]]/s/.\([[:digit:]]*\).*/\1/p" /proc/asound/cards); do + echo "defaults.pcm.card $card" >/tmp/asound.conf + echo "defaults.ctl.card $card" >>/tmp/asound.conf + aplay alarm.wav 1>/dev/null 2>/dev/null + read -t 3 chosen + if [ $? -eq 0 ];then + echo "card number $card works" + echo $card > workingcard + exit + fi +done +if [ ! -f workingcard ]; then + echo "No working sound card found. Maybe the sound is muted?" + rm /tmp/asound.conf +fi + +echo "starting espeakup" +SavedLANG=$LANG +LANG=en +ll_TT=${LANG%.*} +SeTFonts +PutFonts +/etc/rc.d/rc.espeakup start +LANG=$SavedLANG + +sleep 2 +nosound="Warning: speech is not yet available for Greek, Russian, Turkish and Ukrainian." +if ! grep -wq s /proc/cmdline && ! grep -wq S /proc/cmdline; then + nosound="" + echo -n \ +"This installer has speech and Braille device support in order to be +accessible to visually impaired users. To have speech turned on during +installation type S, then press [Enter]. Else, just press Enter." + read sound + if [ "$sound" = "s" ] || [ "$sound" = "S" ]; then + nosound="Warning: speech is not yet available for Greek, Russian, Turkish and Ukrainian." + touch /tmp/speech + else + /etc/rc.d/rc.espeakup stop + fi +fi +clear + +if [ ! "$nosound" = "" ]; then + echo -n \ +"To display keyboard shortcuts for reviewing the screen with speech, +press R, then press [Enter], +Else, just press [Enter]: " + read ANSWER + if [ "$ANSWER" = "R" ] || [ "$ANSWER" = "r" ]; then + /usr/lib/setup/inst + fi +fi +clear +rm -f /tmp/.SlintInstallationLANG + +INITLANG="$LANG" + +LANG=en_US.utf8 dialog --visit-items --no-tags --no-cancel --title "LANGUAGE TO USE DURING INSTALLATION" --default-item "$INITLANG" --menu \ +"Please confirm or change the language. $nosound" 0 0 0 \ +nl_NL.utf8 Dutch \ +en_US.utf8 "English (USA)" \ +fr_FR.utf8 French \ +de_DE.utf8 German \ +el_GR.utf8 Greek \ +it_IT.utf8 Italian \ +nb_NO.utf8 Norwegian \ +pl_PL.utf8 Polish \ +pt_BR.utf8 "Portuguese (Brazil)" \ +pt_PT.utf8 "Portuguese (Portugal)" \ +ru_RU.utf8 Russian \ +es_CR.utf8 "Spanish (Latin America)" \ +sv_SE.utf8 Swedish \ +tr_TR.utf8 Turkish \ +uk_UA.utf8 Ukrainian \ + 2> /tmp/.SlintInstallationLANG +if [ ! $? = 0 ]; then + echo $INITLANG > /tmp/.SlintInstallationLANG +fi + +LANG=$( If you are not using a \"\$kbd\" keyboard map, you may load another one now. Seulement dans /home/didier/Slint/repo/x86_64/slint-14.2.1/next/source/localization/scripts: rc.S.orig diff -ru /home/didier/Slint/repo/x86_64/slint-14.2/source/localization/scripts/rc.ip_forward /home/didier/Slint/repo/x86_64/slint-14.2.1/next/source/localization/scripts/rc.ip_forward --- /home/didier/Slint/repo/x86_64/slint-14.2/source/localization/scripts/rc.ip_forward 2016-05-02 18:52:04.000000000 +0200 +++ /home/didier/Slint/repo/x86_64/slint-14.2.1/next/source/localization/scripts/rc.ip_forward 2017-09-04 14:06:49.838057000 +0200 @@ -11,6 +11,13 @@ # To disable IP packet forwarding at boot time, make this # script non-executable: chmod 644 /etc/rc.d/rc.ip_forward export TEXTDOMAIN=slint +if [ -f /tmp/.SlintInstallationLANG ]; then + LANG=$( /dev/null 2> /dev/null if [ -x usr/bin/fc-cache ]; then diff -ru /home/didier/Slint/repo/x86_64/slint-14.2/source/localization/scripts/setup.05.fontconfig /home/didier/Slint/repo/x86_64/slint-14.2.1/next/source/localization/scripts/setup.05.fontconfig --- /home/didier/Slint/repo/x86_64/slint-14.2/source/localization/scripts/setup.05.fontconfig 2016-05-02 18:52:04.000000000 +0200 +++ /home/didier/Slint/repo/x86_64/slint-14.2.1/next/source/localization/scripts/setup.05.fontconfig 2017-09-04 14:06:49.840057000 +0200 @@ -1,6 +1,13 @@ #!/bin/sh #BLURB="Run fc-cache to locate new fonts for Xft" export TEXTDOMAIN=slint +if [ -f /tmp/.SlintInstallationLANG ]; then + LANG=$(/dev/null done -for package in $(find -name "*t?z"); do +# Create the group braille for brlapi. +# We do this as soon as bash is installed (so we can chroot) and shadow +# is installed (so can we run groupadd through chroot) +groupadd -fg 610 braille +chroot $ROOTDIR groupadd -fg 610 braille +# Create the group and user lightdm for lightdm. +chroot $ROOTDIR groupadd -fg 620 lightdm +chroot $ROOTDIR useradd -c "Light Display Manager" -d /var/lib/lightdm -u 620 -g lightdm -G audio,braille -s /sbin/nologin lightdm +# Make gdm a member of the audio and braille groups +chroot $ROOTDIR usermod -a -G audio,braille gdm +# Set the sound card that was probed in rc.S +if [ -f /tmp/asound.conf ]; then + cp /tmp/asound.conf $ROOTDIR/etc/ + chmod 644 $ROOTDIR/etc/asound.conf + rm /etc/asound.conf +fi + +for package in $(find -name "*t?z"); do + SHORTNAME=$(basename $package|sed "s/-[^-]*-[^-]*-[^-]*$//") if printf "$first"|grep "$package" 1>/dev/null; then continue fi if printf $package|grep "locales/" 1>/dev/null; then continue fi + # If requested do not install the kde packages. + # kdepackages includes all packages from the kde series, but the + # oxygen-icons and oxygen-gtk2 plus akonadi. + if [ "$installkde" = "1" ]; then + liste=$(grep "${SHORTNAME}" /usr/lib/setup/kdepackages) + if [ ! "$liste" = "" ]; then + for i in $liste; do + if [ "$i" = "$SHORTNAME" ] ; then + continue 2 + fi + done + fi + fi # Install the package with terse description if [ -f ${package%t?z}desc ]; then sed -n "1p" ${package%t?z}desc @@ -103,7 +144,7 @@ else echo "${package%.t?z} (no available description)" fi - spkg -i --root=$ROOTDIR -qq --no-ldconfig --no-gtk-update-icon-cache $package + spkg -i --root=$ROOTDIR -qq --no-ldconfig --no-gtk-update-icon-cache $package 2>>/tmp/ERREURS ERROR=$? if [ ! $ERROR = 0 ]; then errorcode $ERROR $package diff -ru /home/didier/Slint/repo/x86_64/slint-14.2/source/localization/scripts/startupmode /home/didier/Slint/repo/x86_64/slint-14.2.1/next/source/localization/scripts/startupmode --- /home/didier/Slint/repo/x86_64/slint-14.2/source/localization/scripts/startupmode 2016-07-08 22:57:55.000000000 +0200 +++ /home/didier/Slint/repo/x86_64/slint-14.2.1/next/source/localization/scripts/startupmode 2017-09-04 14:06:49.842057000 +0200 @@ -3,6 +3,13 @@ # Public domain TMP=$(mktemp -d) || exit 1 export TEXTDOMAIN=slint +if [ -f /tmp/.SlintInstallationLANG ]; then + LANG=$(> $TMP/tmpscript.sh else echo -n "#!/bin/sh -dialog --visit-items $BACKTITLE --title \"" >> $TMP/tmpscript.sh +dialog --visit-items --no-tags $BACKTITLE --title \"" >> $TMP/tmpscript.sh gettext "SELECT DEFAULT WINDOW MANAGER FOR X" >> $TMP/tmpscript.sh echo -n "\" $PRESELECT --menu \"" >> $TMP/tmpscript.sh gettext "Please select the default window manager to use with the X Window \ @@ -135,7 +154,12 @@ # Add XFce: if [ -r $T_PX/etc/X11/xinit/xinitrc.xfce ]; then echo "\"xinitrc.xfce\" \"`gettext "The Cholesterol Free Desktop Environment"`\" \\" >> $TMP/tmpscript.sh -fi +fi + +# Add LXDE: +if [ -r $T_PX/etc/X11/xinit/xinitrc.lxde ]; then + echo "\"xinitrc.lxde\" \"`gettext "Lightweight X11 Desktop Environment LXDE"`\" \\" >> $TMP/tmpscript.sh +fi # Add Enlightenment16: if [ -r $T_PX/etc/X11/xinit/xinitrc.e16 ]; then @@ -162,12 +186,6 @@ echo "\"xinitrc.wmaker\" \"`gettext "WindowMaker"`\" \\" >> $TMP/tmpscript.sh fi - -# Add FVWM2: -if [ -r $T_PX/etc/X11/xinit/xinitrc.fvwm2 ]; then - echo "\"xinitrc.fvwm2\" \"`gettext "F(?) Virtual Window Manager"`\" \\" >> $TMP/tmpscript.sh -fi - # Add icewm: if [ -r $T_PX/etc/X11/xinit/xinitrc.icewm ]; then echo "\"xinitrc.icewm\" \"`gettext "ICE Window Manager"`\" \\" >> $TMP/tmpscript.sh @@ -190,7 +208,7 @@ # Add Awesome: if [ -r $T_PX/etc/X11/xinit/xinitrc.awesome ]; then - echo "\"xinitrc.awesome\" \"`gettext "The Mate desktop"`\" \\" >> $TMP/tmpscript.sh + echo "\"xinitrc.awesome\" \"`gettext "The Awesome Window Manager"`\" \\" >> $TMP/tmpscript.sh fi @@ -203,7 +221,8 @@ -a ! "$file" = "xinitrc.icewm" -a ! "$file" = "xinitrc.twm" \ -a ! "$file" = "xinitrc.xfce" -a ! "$file" = "xinitrc.awesome" \ -a ! "$file" = "xinitrc.blackbox" -a ! "$file" = "xinitrc.fluxbox" \ - -a ! "$file" = "xinitrc.mate" -a ! "$file" = "xinitrc.afterstep" ]; then + -a ! "$file" = "xinitrc.mate" -a ! "$file" = "xinitrc.afterstep" \ + -a ! "$file" = "xinitrc.lxde" ]; then echo "\"$file\" \"$file\" \\" >> $TMP/tmpscript.sh fi done @@ -229,62 +248,59 @@ OUTPUT=`cat $TMP/output` -# If xwmconfig is run by root, it changes the system-wide default for users -# that do not have a $HOME/.xinitrc: +case $OUTPUT in + xinitrc.kde) session=/usr/bin/startkde;; + xinitrc.gnome) session=/usr/bin/gnome-session;; + xinitrc.xfce) session=/usr/bin/startxfce4;; + xinitrc.icewm) session=/usr/bin/icewm-session;; + xinitrc.mate) session=/usr/bin/mate-session;; + xinitrc.wmaker) session=/usr/bin/startwmaker;; + xinitrc.e16) session=/usr/share/e16/misc/starte16;; + xinitrc.enlightenment) session=/usr/bin/enlightenment_start;; + xinitrc.blackbox) session=/usr/bin/startblackbox;; + xinitrc.fluxbox) session=/usr/bin/startfluxbox;; + xinitrc.twm) session=/usr/bin/starttwm;; + xinitrc.awesome) session=/usr/bin/awesome;; + *) session=/usr/bin/lxsession;; +esac + + +# If xwmconfig is run by root, it changes the system-wide default, else +# it overrides lightdm's current session if [ "$USER" = "root" ]; then if [ -r $T_PX/etc/X11/xinit/$OUTPUT ]; then ( cd $T_PX/etc/X11/xinit ; rm -f xinitrc ; ln -sf $OUTPUT xinitrc ) - TMPFILE=$(mktemp) - LXDM=/etc/lxdm/lxdm.conf - case $OUTPUT in - xinitrc.kde) - sed /^session/s:.*:session=/usr/bin/startkde: $LXDM > $TMPFILE; mv $TMPFILE $LXDM;; - xinitrc.gnome) - sed /^session/s:.*:session=/usr/bin/gnome-session: $LXDM > $TMPFILE; mv $TMPFILE $LXDM;; - xinitrc.xfce) - sed /^session/s:.*:session=/usr/bin/startxfce4: $LXDM > $TMPFILE; mv $TMPFILE $LXDM;; - xinitrc.fvwm2) - sed /^session/s:.*:session=/usr/bin/startfvwm2: $LXDM > $TMPFILE; mv $TMPFILE $LXDM;; - xinitrc.icewm) - sed /^session/s:.*:session=/usr/bin/icewm-session: $LXDM > $TMPFILE; mv $TMPFILE $LXDM;; - xinitrc.mate) - sed /^session/s:.*:session=/usr/bin/mate-session: $LXDM > $TMPFILE; mv $TMPFILE $LXDM;; - xinitrc.wmaker) - sed /^session/s:.*:session=/usr/bin/wmaker: $LXDM > $TMPFILE; mv $TMPFILE $LXDM;; - xinitrc.e16) - sed /^session/s:.*:session=/usr/share/e16/misc/starte16: $LXDM > $TMPFILE; mv $TMPFILE $LXDM;; - xinitrc.enlightenment) - sed /^session/s:.*:session=/usr/bin/enlightenment_start: $LXDM > $TMPFILE; mv $TMPFILE $LXDM;; - xinitrc.blackbox) - sed /^session/s:.*:session=/usr/bin/startblackbox: $LXDM > $TMPFILE; mv $TMPFILE $LXDM;; - xinitrc.fluxbox) - sed /^session/s:.*:session=/usr/bin/startfluxbox: $LXDM > $TMPFILE; mv $TMPFILE $LXDM;; - xinitrc.twm) - sed /^session/s:.*:session=/usr/bin/starttwm: $LXDM > $TMPFILE; mv $TMPFILE $LXDM;; - xinitrc.awesome) - sed /^session/s:.*:session=/usr/bin/awesome: $LXDM > $TMPFILE; mv $TMPFILE $LXDM;; -# TODO: provide a .desktop for AfterStep -# xinitrc.afterstep) -# sed /^session/s:.*:session=/usr/bin/afterstep: $LXDM > $TMPFILE; mv $TMPFILE $LXDM;; - *) - sed /^session/s:.*:session=/usr/bin/startfluxbox: $LXDM > $TMPFILE; mv $TMPFILE $LXDM;; - esac - fi -fi - -# Also set up a new $HOME/.xinitrc and $HOME/.xinitrc: -if [ -r /etc/X11/xinit/$OUTPUT -a ! "$HOME" = "/" ]; then - if [ -r $HOME/.xinitrc ]; then - rm -f $HOME/.xinitrc-backup - mv $HOME/.xinitrc $HOME/.xinitrc-backup - fi - cat /etc/X11/xinit/$OUTPUT > $HOME/.xinitrc - if [ -r $HOME/.xsession ]; then - rm -f $HOME/.xsession-backup - mv $HOME/.xsession $HOME/.xsession-backup + ( cd $T_PX/etc/lxdm + sed /^session/s:.*:session=$session: lxdm.conf > lxdm.conf.other + mv lxdm.conf.other lxdm.conf + ) + newsession=$(printf $OUTPUT|sed s/xinitrc.//) + (cd /etc/lightdm + sed "s/^user-session=.*/user-session=$newsession/" lightdm.conf > prov + mv prov lightdm.conf + ) fi - cat /etc/X11/xinit/$OUTPUT > $HOME/.xsession - chmod 755 $HOME/.xsession +else + # Set the session chosen as default for the user in concern and + # remove the indicator telling that xwmconfig has not yet been run + # as regular user for this user case occurring. Do that only if + # there is a matching .desktop session file. + thissession=$(printf $OUTPUT|sed s/xinitrc.//) + [ "$thissession" = "lxde" ] && thissession=LXDE + [ "$thissession" = "kde" ] && thissession=kde-plasma + # For lxdm + if [ -f /usr/share/xsessions/${thissession}.desktop ]; then + user_xsession.py --user-name $USER set $thissession + echo '[Desktop]' > $HOME/.dmrc + echo "Session=$thissession" >> $HOME/.dmrc + fi + # For xdm + echo $session > $HOME/.xsession + # Also set up a new $HOME/.xinitrc for startx + if [ -r $HOME/.xinitrc ]; then + rm -f $HOME/.xinitrc-backup + mv $HOME/.xinitrc $HOME/.xinitrc-backup + fi + cat /etc/X11/xinit/$OUTPUT > $HOME/.xinitrc fi - rm -f $TMP/tmpscript.sh $TMP/output Seulement dans /home/didier/Slint/repo/x86_64/slint-14.2.1/next/source/localization/scripts: zzz-settings