home *** CD-ROM | disk | FTP | other *** search
- #!/bin/bash
- PATH="/usr/bin:/bin:/sbin:/usr/sbin:/usr/ssl/bin:/usr/X11R6/bin";export PATH
- ln -s /dev/vc/1 /dev/tty1
- ln -s /dev/vc/2 /dev/tty2
- ln -s /dev/vc/3 /dev/tty3
- ln -s /dev/vc/4 /dev/tty4
- ln -s /dev/vc/5 /dev/tty5
- ln -s /dev/vc/6 /dev/tty6
-
- ln -s /dev/misc/psaux /dev/mouse
-
-
- for (( i=10 ; i>0 ; i-- )) ; do
- echo -en "Load config from floppy? [$i seconds] (y/N) \r"
- read -t 1 -s -n 1 CONFIGFLOPPY
- if [ "x$CONFIGFLOPPY" = "xY" ]; then
- CONFIGFLOPPY=y
- fi
- if [ "x$CONFIGFLOPPY" = "xN" ]; then
- CONFIGFLOPPY=n
- fi
- if [ "x$CONFIGFLOPPY" = "xy" ]; then
- i=0
- fi
- if [ "x$CONFIGFLOPPY" = "xn" ]; then
- i=0
- fi
- done
- echo " "
- export CONFIGFLOPPY
-
- for (( i=10 ; i>0 ; i-- )) ; do
- echo -en "Watch bootup steps? [$i seconds] (y/N) \r"
- read -t 1 -s -n 1 WATCHBOOT
- if [ "x$WATCHBOOT" = "xY" ]; then
- WATCHBOOT=y
- fi
- if [ "x$WATCHBOOT" = "xN" ]; then
- WATCHBOOT=n
- fi
- if [ "x$WATCHBOOT" = "xy" ]; then
- i=0
- fi
- if [ "x$WATCHBOOT" = "xn" ]; then
- i=0
- fi
- done
- echo " "
- export WATCHBOOT
-
-
- if [ "x$WATCHBOOT" = "xy" ]; then
- echo "*******************" >/dev/tty1
- echo "Testing tty devices" >/dev/tty1
- echo "*******************" >/dev/tty1
-
- echo "You should have seen a test message just above"
- echo "1000: Press Enter to Continue"
- read A
- fi
-
-
- echo "****************************"
- echo "Started /etc/rc.d/rc.sysinit"
- echo "****************************"
-
- if [ "x$WATCHBOOT" = "xy" ]; then
- echo "Here is /dev"
- ls -lR /dev
- echo "2000: Press Enter to Continue"
- read A
- fi
-
-
- echo "Mounting /proc"
- mount -n -t proc /proc /proc
-
- if [ "x$WATCHBOOT" = "xy" ]; then
- cat /proc/mounts
- echo "2500: Press Enter to Continue"
- read A
- fi
-
-
- echo "Mounting /proc/bus/usb"
- mount -t usbdevfs none /proc/bus/usb
-
-
- ROOTFS=`grep "^\/dev\/root" /proc/mounts |cut -d" " -f3`
- echo "Root FS: $ROOTFS"
-
- if [ "x$WATCHBOOT" = "xy" -a "x$ROOTFS" != "xiso9660" ]; then
- echo "3000: Do you want to mount / as read-write (Press 'y' for yes, or press Enter to Continue"
- read A
- fi
-
- if [ -e /stillbuilding.txt ]; then
- A=y
- fi
-
- if [ "x$A" = "xy" ] ; then
- fsck -y /dev/root
- #Remount root as read-write
- mount -n -o remount,rw /
-
- if [ "x$WATCHBOOT" = "xy" ]; then
- echo "4000: Both / and /proc should be mounted now. Press Enter to Continue"
- read A
- fi
-
- mount -f remount,rw /
-
- if [ ! -d /usr/bin ] ; then
- mount /dev/ide/host0/bus0/target1/lun0/part2 /usr
- fi
-
- else
- if [ ! -d /usr/bin ] ; then
- if [ -e /tpmusr.cloop ]; then
- modprobe cloop file=/tpmusr.cloop
- mount -o ro /dev/cloop/0 /usr
- else
- mount -o ro /dev/ide/host0/bus0/target1/lun0/part2 /usr
- fi
- fi
-
- . /etc/rc.d/rc.iso
- fi
-
- grep "^root:" /etc/shadow |cut -d: -f2 |grep "^\!"
- if [ $? -eq 0 ]; then
- echo "*******************************"
- echo "* *"
- echo "* The root account is *"
- echo "* currently locked. *"
- echo "* *"
- echo "* You must enter a password *"
- echo "* before proceeding. *"
- echo "* *"
- echo "*******************************"
- passwd root
- fi
-
-
- mount -f /proc
-
- if [ "x$WATCHBOOT" = "xy" ]; then
- touch /etc/watchboot
- touch /etc/interactiveboot
- fi
-
- if [ -e /etc/watchboot ]; then
- echo "Here are the current mounts"
- mount
- echo "5000: Press Enter to Continue"
- read A
- fi
-
-
- #if [ -e /etc/watchboot ]; then
- #echo "Enter a Command (or blank to continue)"
- #echo -n ">"
- #read A
- #while [ "x$A" != "x" ]; do
- #$A
- #echo "Enter a Command (or blank to continue)"
- #echo -n ">"
- #read A
- #done
- #fi
-
- echo "*****************************"
- echo "Finished /etc/rc.d/rc.sysinit"
- echo "*****************************"
-