File:  [Power 6/32 Unix Tahoe 4.2BSD] / cci / usr / src / etc / rc
Revision 1.1.1.2 (vendor branch): download - view: text, annotated - select for diffs
Sun Jul 28 12:24:24 2019 UTC (7 years ago) by root
Branches: bsd, MAIN
CVS tags: v121, HEAD
Power 6/32 Unix version 1.21

HOME=/; export HOME
PATH=/bin:/usr/bin
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
	/etc/fsck -p >/dev/console
	case $? in
	0)
		date >/dev/console
		;;
	4)
		/etc/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
rm -f /etc/nologin

# 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
cp /dev/null /etc/mtab
chmod 666 /etc/motd
/etc/swapon -a							>/dev/console
/etc/mount -a							>/dev/console
				echo clearing /tmp 		>/dev/console
(cd /tmp; rm -f *)
if [ -s /etc/rc.sp ]
then
	. /etc/rc.sp
fi
if [ -s /etc/rc.op ]
then
	. /etc/rc.op
fi
sh /etc/rc.local
chmod 666 /tmp/prolock*
				echo preserving editor files 	>/dev/console
(cd /tmp; /usr/lib/ex3.7preserve -a)
				echo -n standard daemons:	>/dev/console
/etc/update;			echo -n ' update'		>/dev/console
/etc/cron;			echo -n ' cron'			>/dev/console
/etc/accton /usr/adm/acct;	echo -n ' accounting'		>/dev/console
/etc/comsat;			echo -n ' mail'			>/dev/console
cd /usr/spool
rm -f uucp/LCK/*
if [ -f /usr/lib/lpd ]; then
	rm -f /dev/printer
	/usr/lib/lpd &		echo -n ' printer'		>/dev/console
fi
				echo '.'			>/dev/console

cd /
				echo '.'			>/dev/console
				date				>/dev/console
exit 0

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.