BSD 4_3_Tahoe development
authorCSRG <csrg@ucbvax.Berkeley.EDU>
Sun, 10 Jul 1988 04:21:15 +0000 (20:21 -0800)
committerCSRG <csrg@ucbvax.Berkeley.EDU>
Sun, 10 Jul 1988 04:21:15 +0000 (20:21 -0800)
Work on file usr/src/sys/tahoedist/rc

Synthesized-from: CSRG/cd2/4.3tahoe

usr/src/sys/tahoedist/rc [new file with mode: 0644]

diff --git a/usr/src/sys/tahoedist/rc b/usr/src/sys/tahoedist/rc
new file mode 100644 (file)
index 0000000..beb89ae
--- /dev/null
@@ -0,0 +1,123 @@
+HOME=/; export HOME
+PATH=/etc:/bin:/usr/ucb:/usr/bin; export PATH
+
+if [ -r /fastboot ]
+then
+       rm -f /fastboot
+       echo Fast boot ... skipping disk checks >/dev/console
+elif [ $1x = autobootx ]
+then
+       echo Automatic reboot in progress...            >/dev/console
+       date                                            >/dev/console
+       fsck -p                                         >/dev/console 2>&1
+       case $? in
+       0)
+               date >/dev/console
+               ;;
+       2)
+               exit 1
+               ;;
+       4)
+               reboot -n
+               ;;
+       8)
+               echo "Automatic reboot failed... help!" >/dev/console
+               exit 1
+               ;;
+       12)
+               echo "Reboot interrupted" >/dev/console
+               exit 1
+               ;;
+       *)
+               echo "Unknown error in reboot" > /dev/console
+               exit 1
+               ;;
+       esac
+else
+       date >/dev/console
+fi
+
+# attempt to rationally recover the passwd file if needed
+if [ -s /etc/ptmp ]
+then
+       if [ -s /etc/passwd ]
+       then
+               ls -l /etc/passwd /etc/ptmp >/dev/console
+               rm -f /etc/ptmp         # should really remove the shorter
+       else
+               echo 'passwd file recovered from ptmp' >/dev/console
+               mv /etc/ptmp /etc/passwd
+       fi
+elif [ -r /etc/ptmp ]
+then
+       echo 'removing passwd lock file' >/dev/console
+       rm -f /etc/ptmp
+fi
+
+umount -a
+: >/etc/mtab
+mount -f `awk -F: '$2 == "/" && $3 ~ /r[wq]/ { print $1 }' </etc/fstab` /
+swapon -a                                              >/dev/console 2>&1
+mount -a                                               >/dev/console 2>&1
+
+                       echo -n 'checking quotas:'      >/dev/console
+quotacheck -a -p                                       >/dev/console 2>&1
+                       echo ' done.'                   >/dev/console
+quotaon -a
+
+ps -U                                                  >/dev/console 2>&1
+rm -f /etc/nologin
+rm -f /usr/spool/uucp/LCK.*
+rm -f /usr/spool/uucp/STST/*
+chmod 666 /dev/tty[pqrs]*
+
+# set hostname, turn on network
+. /etc/netstart
+
+                       echo 'starting system logger'   >/dev/console
+rm -f /dev/log
+syslogd
+
+# /etc/crash should be a symbolic link to the crash directory
+# if core dumps are to be saved.
+if [ -d /etc/crash ]; then
+       echo            'checking for core dump... '    >/dev/console
+       savecore /etc/crash                             >/dev/console 2>&1
+fi
+
+                       echo preserving editor files    >/dev/console
+(cd /tmp; /usr/lib/ex3.7preserve -a)
+                       echo clearing /tmp              >/dev/console
+(cd /tmp; find . ! -name . ! -name lost+found ! -name quotas -exec rm -r {} \; )
+
+                       echo -n standard daemons:       >/dev/console
+update;                        echo -n ' update'               >/dev/console
+cron;                  echo -n ' cron'                 >/dev/console
+accton /usr/adm/acct;  echo -n ' accounting'           >/dev/console
+                       echo '.'                        >/dev/console
+
+echo -n starting network daemons:                      >/dev/console
+
+# $routedflags is imported from /etc/netstart;
+# if $routedflags == NO, routed isn't run.
+if [ ${routedflags-X} != "NO" ]; then
+       routed $routedflags; echo -n ' routed'          >/dev/console
+fi
+
+named;                 echo -n ' named'                >/dev/console
+inetd;                 echo -n ' inetd'                >/dev/console
+
+# $rwhod is imported from /etc/netstart;
+# if $rwhod is set to something other than NO, rwhod is run.
+if [ ${rwhod-NO} != "NO" ]; then
+       rwhod;          echo -n ' rwhod'                >/dev/console
+fi
+
+rm -f /dev/printer
+/usr/lib/lpd;          echo -n ' printer'              >/dev/console
+                       echo '.'                        >/dev/console
+
+sh /etc/rc.local
+
+                       date                            >/dev/console
+exit 0