home *** CD-ROM | disk | FTP | other *** search
- #!/bin/sh
- T_PX="`cat /tmp/SeTT_PX`"
- ROOT_DEVICE="`cat /tmp/SeTrootdev`"
- if [ ! -d $T_PX/bin -a ! -d $T_PX/etc ]; then # if there no Linux here, exit
- exit
- fi
- dialog --title "CONFIGURE YOUR SYSTEM?" --yesno "Now it's time to configure \
- your Linux system. If this is a new system, you must configure it now or it \
- will not boot correctly. Otherwise, you can back out to the main menu if \
- you're sure you want to skip this step. If you've installed a new kernel \
- image, it's important to reconfigure your system so that you can create a \
- bootdisk using the new kernel. Do you want to \
- move on to \
- the CONFIGURE option?" 13 60
- if [ $? = 1 -o $? = 255 ]; then
- exit
- fi
- dialog --title "MAKE BOOT DISK?" --yesno "It is HIGHLY recommended that you \
- make a standard boot disk \
- for your Linux system at this time. \
- Even if you don't plan to boot with a bootdisk, it's a good \
- idea to have one for your system as a backup boot method. \
- Would you like to make a standard \
- boot disk?" 10 60
- if [ $? = 0 ]; then
- dialog --title "BOOT DISK CREATION" --yesno \
- "Now put a formatted floppy in your boot drive. This will be made into your \
- Linux boot disk. \
- Any data on the target disk will be destroyed. \
- "YES" creates the disk, "NO" aborts." 9 50
- if [ $? = 0 ]; then
- dialog --title "CREATING DISK" --infobox "Creating boot disk from 'vmlinuz'..." 5 50
- KERNEL="/vmlinuz"
- # echo " - writing kernel to disk: (dd if=$T_PX$KERNEL of=/dev/fd0)"
- dd if=$T_PX$KERNEL of=/dev/fd0 1> /dev/null 2> /dev/null
- # echo "Configuring boot disk..."
- # echo -n " - boot device: "
- rdev /dev/fd0 $ROOT_DEVICE
- # echo "(rdev /dev/fd0 $ROOT_DEVICE)"
- # echo -n " - video mode: "
- rdev -v /dev/fd0 -1
- # echo "(rdev -v /dev/fd0 -1)"
- # echo -n " - mount root read-write for umsdos: "
- # echo "(rdev -R /dev/fd0 0)"
- rdev -R /dev/fd0 0
- sync
- # echo "Boot disk created."
- else
- dialog --title "SKIPPED BOOT DISK CREATION" --msgbox \
- "Boot disk creation skipped. You'll have to use the bootkernel \n\
- to start your system with this command at the LILO prompt: \n\
- \n\
- mount root=`cat /tmp/SeTrootdev` rw\n\
- \n\
- Or use Loadlin to boot from MS-DOS:\n\
- \n\
- loadlin \\linux\\vmlinuz root=`cat /tmp/SeTrootdev` rw\n\
- \n" 13 67
- fi
- else
- dialog --title "SKIPPED BOOT DISK CREATION" --msgbox \
- "Boot disk creation skipped. You'll have to use the bootkernel \n\
- to start your system with this command at the LILO prompt: \n\
- \n\
- mount root=`cat /tmp/SeTrootdev` rw\n\
- \n\
- Or use Loadlin to boot from MS-DOS:\n\
- \n\
- loadlin \\linux\\vmlinuz root=`cat /tmp/SeTrootdev` rw\n\
- \n" 13 67
- fi
- dialog --title "MODEM CONFIGURATION" --yesno \
- "\n\
- This part of the configuration process will create a link in /dev\n\
- from your callout device (cua0, cua1, cua2, cua3) to /dev/modem.\n\
- You can change this link later if you put your modem on a different\n\
- port.\n\n\
- Would you like to set up your modem?\n" 12 73
- if [ $? = 0 ]; then
- dialog --title "SELECT CALLOUT DEVICE" \
- --menu "Please select the callout device which you would like to use \
- for your modem:" 12 60 4 \
- "cua0" "com1: under DOS" \
- "cua1" "com2: under DOS" \
- "cua2" "com3: under DOS" \
- "cua3" "com4: under DOS" 2> /tmp/callout
- if [ $? = 1 ]; then
- rm -f /tmp/callout
- else
- MODEM_DEVICE="`cat /tmp/callout`"
- rm -f /tmp/callout
- (cd $T_PX/dev; ln -sf $MODEM_DEVICE modem)
- fi
- fi
-
-
- dialog --title "MOUSE CONFIGURATION" \
- --yesno "\n\
- This part of the configuration process will create a link in /dev\n\
- from your mouse device to /dev/mouse. You can change this link\n\
- later if the setting chosen does not work, or if you switch to a\n\
- different type of mouse.\n\n\
- Would you like to set up your mouse?" 12 70
- if [ $? = 0 ]; then
- dialog --title "SELECT MOUSE TYPE" --menu "These mouse types are supported:" \
- 13 60 6 \
- "1" "Microsoft compatible serial mouse" \
- "2" "C&T 82C710 or PS/2 style mouse (Auxiliary port)" \
- "3" "Logitech Bus Mouse" \
- "4" "ATI XL Bus Mouse" \
- "5" "Microsoft Bus Mouse" \
- "6" "Mouse Systems serial mouse" 2> /tmp/mtype
- if [ $? = 1 ]; then
- rm -f /tmp/mtype
- touch /tmp/mtype
- fi
- MOUSE_TYPE="`cat /tmp/mtype`"
- rm -f /tmp/mtype
- if [ "$MOUSE_TYPE" = "1" -o "$MOUSE_TYPE" = "6" ]; then
- dialog --title "SELECT SERIAL PORT" --menu "Your mouse requires a serial port. Which one would you \
- like to use?" 12 60 4 \
- "ttyS0" "com1: under DOS" \
- "ttyS1" "com2: under DOS" \
- "ttyS2" "com3: under DOS" \
- "ttyS3" "com4: under DOS" 2> /tmp/mport
- if [ $? = 1 ]; then
- rm -f /tmp/mport
- else
- MOUSE_DEVICE="`cat /tmp/mport`"
- (cd $T_PX/dev; ln -sf $MOUSE_DEVICE mouse)
- if [ "$MOUSE_TYPE" = "1" ]; then
- MTYPE="ms"
- else
- MTYPE="msc"
- fi
- fi
- rm -f /tmp/mport
- elif [ "$MOUSE_TYPE" = "2" ]; then
- (cd $T_PX/dev; ln -sf psaux mouse)
- MTYPE="ps2"
- elif [ "$MOUSE_TYPE" = "3" ]; then
- (cd $T_PX/dev; ln -sf logibm mouse)
- MTYPE="logi"
- elif [ "$MOUSE_TYPE" = "4" ]; then
- (cd $T_PX/dev; ln -sf atibm mouse)
- MTYPE="bm"
- elif [ "$MOUSE_TYPE" = "5" ]; then
- (cd $T_PX/dev; ln -sf inportbm mouse)
- MTYPE="bm"
- fi
- fi
- export MTYPE
-
- ( cd $T_PX ; chmod 755 ./ )
- ( cd $T_PX ; chmod 755 ./var )
- if [ ! -d $T_PX/proc ]; then
- mkdir $T_PX/proc
- chown root.root $T_PX/proc
- fi
- if [ ! -d $T_PX/var/spool/uucp ]; then
- mkdir -p $T_PX/var/spool/uucp
- fi
- chown uucp.uucp $T_PX/var/spool/uucp
- chmod 1777 $T_PX/var/spool/uucp
- if [ ! -d $T_PX/var/spool/uucppublic ]; then
- mkdir -p $T_PX/var/spool/uucppublic
- fi
- chown uucp.uucp $T_PX/var/spool/uucppublic
- chmod 1777 $T_PX/var/spool/uucppublic
- chmod 1777 $T_PX/tmp
- if [ ! -d $T_PX/var/spool/mail ]; then
- mkdir -p $T_PX/var/spool/mail
- chmod 755 $T_PX/var/spool
- chown root.mail $T_PX/var/spool/mail
- chmod 775 $T_PX/var/spool/mail
- fi
-
- # Post installation and setup scripts added by packages.
- if [ -d $T_PX/var/adm/setup ]; then
- for INSTALL_SCRIPTS in $T_PX/var/adm/setup/setup.*
- do
- SCRIPT=`basename $INSTALL_SCRIPTS`
- # Here, we call each script in /var/adm/setup. Two arguments are provided:
- # 1 -- the target prefix (normally /, but /mnt from the bootdisk)
- # 2 -- the name of the root device.
- if [ ! "$SCRIPT" = "setup.liloconfig" ]; then
- ( cd $T_PX ; sh var/adm/setup/$SCRIPT $T_PX $ROOT_DEVICE )
- fi
- if echo $SCRIPT | fgrep onlyonce 1> /dev/null 2> /dev/null; then # only run after first install
- if [ ! -d $T_PX/var/adm/setup/install ]; then
- mkdir $T_PX/var/adm/setup/install
- fi
- mv $INSTALL_SCRIPTS $T_PX/var/adm/setup/install
- fi
- done
- fi
-
- # Load keyboard map (if any) when booting
- if [ -r /tmp/SeTkeymap ]; then
- MAPNAME="`cat /tmp/SeTkeymap`"
- if fgrep "sh /etc/rc.d/rc.keymap" $T_PX/etc/rc.d/rc.local 1> /dev/null 2> /dev/null ; then
- echo >> /dev/null # ?
- else
- echo "# Load custom keyboard map" >> $T_PX/etc/rc.d/rc.local
- echo "sh /etc/rc.d/rc.keymap" >> $T_PX/etc/rc.d/rc.local
- fi
- mkdir -p $T_PX/usr/lib/kbd/keytables
- if [ ! -r $T_PX/usr/lib/kbd/keytables/$MAPNAME ]; then
- cp /tmp/$MAPNAME $T_PX/usr/lib/kbd/keytables
- chmod 755 $T_PX/usr/lib/kbd/keytables
- fi
- echo "#!/bin/sh" > $T_PX/etc/rc.d/rc.keymap
- echo "echo 'Loading keyboard map \"$MAPNAME\"...'" >> $T_PX/etc/rc.d/rc.keymap
- echo "/usr/bin/loadkeys /usr/lib/kbd/keytables/$MAPNAME" >> $T_PX/etc/rc.d/rc.keymap
- chmod 755 $T_PX/etc/rc.d/rc.keymap
- fi
-