--- dist/rc	Tue Aug 12 18:51:27 2008
+++ mod/rc	Thu Nov 20 15:23:52 2008
@@ -71,18 +71,6 @@
 	done
 }
 
-mixerctl_conf()
-{
-	test -s /etc/mixerctl.conf || return
-
-	# delete comments and blank lines
-	set -- `stripcom /etc/mixerctl.conf`
-	while [ $# -ge 1 ] ; do
-		mixerctl -q $1 > /dev/null 2>&1
-		shift
-	done
-}
-
 wsconsctl_conf()
 {
 	local save_IFS="$IFS"
@@ -181,23 +169,6 @@
 	exit 0
 fi
 
-# Configure ccd devices.
-if [ -f /etc/ccd.conf ]; then
-	ccdconfig -C
-fi
-
-# Configure raid devices.
-for dev in 0 1 2 3; do
-	if [ -f /etc/raid$dev.conf ]; then
-		raidctl -c /etc/raid$dev.conf raid$dev
-	fi
-done
-
-# Check parity on raid devices.
-raidctl -P all
-
-swapctl -A -t blk
-
 if [ -e /fastboot ]; then
 	echo "Fast boot: skipping disk checks."
 elif [ X"$1" = X"autoboot" ]; then
@@ -238,9 +209,35 @@
 
 umount -a >/dev/null 2>&1
 mount -a -t nonfs,vnd
-mount -uw /		# root on nfs requires this, others aren't hurt
-rm -f /fastboot		# XXX (root now writeable)
 
+mount_mfs -s 1024 -i 512 swap /dev
+mount_mfs -s 1024 swap /var/run
+mount_mfs -s 1024 swap /var/empty
+mount_mfs -s 65536 swap /var/log
+mount_mfs -s 16384 swap /var/named
+mount_mfs -s 4096 swap /tmp
+mount_mfs -s 32768 swap /home
+
+cd /dev ; /etc/MAKEDEV ramdisk pty pf bpf1 bpf2 bpf3 bpf4 bpf5 bpf6 bpf7 tun
+
+touch /var/log/messages ; chmod 644 /var/log/messages
+touch /var/log/authlog  ; chmod 640 /var/log/authlog
+touch /var/log/secure   ; chmod 600 /var/log/secure
+touch /var/log/daemon   ; chmod 640 /var/log/daemon
+touch /var/log/maillog  ; chmod 600 /var/log/maillog
+touch /var/log/cron     ; chmod 600 /var/log/cron
+touch /var/run/dhclient.leases.sis0 ; chmod 600 /var/run/dhclient.leases.sis0
+touch /var/run/dhclient.leases.sis1 ; chmod 600 /var/run/dhclient.leases.sis1
+touch /var/run/dhclient.leases.sis2 ; chmod 600 /var/run/dhclient.leases.sis2
+
+cp -Rp /cfhome/* /home/
+cp -Rp /var/named-dist/* /var/named/
+mkdir -p /var/log/cron-running
+cp -Rp /var/cron/atjobs-dist /var/log/cron-running/atjobs
+cp -Rp /var/cron/tabs-dist /var/log/cron-running/tabs
+
+mount -ur /
+
 random_seed
 
 # pick up option configuration
@@ -290,10 +287,6 @@
 # set hostname, turn on network
 echo 'starting network'
 ifconfig -g carp carpdemote 128
-if [ -f /etc/resolv.conf.save ]; then
-	mv /etc/resolv.conf.save /etc/resolv.conf
-	touch /etc/resolv.conf
-fi
 . /etc/netstart
 
 if [ X"${pf}" != X"NO" ]; then
@@ -320,11 +313,10 @@
 fi
 
 # clean up left-over files
-rm -f /etc/nologin
-rm -f /var/spool/lock/LCK.*
-rm -f /var/spool/uucp/STST/*
+#rm -f /var/spool/lock/LCK.*
+#rm -f /var/spool/uucp/STST/*
 (cd /var/run && { rm -rf -- *; install -c -m 664 -g utmp /dev/null utmp; })
-(cd /var/authpf && rm -rf -- *)
+#(cd /var/authpf && rm -rf -- *)
 
 # save a copy of the boot messages
 dmesg >/var/run/dmesg.boot
@@ -433,12 +425,6 @@
 	fi
 fi
 
-if [ X"${amd}" = X"YES" -a -e ${amd_master} ]; then
-	echo -n ' amd'
-	(cd /etc/amd; amd -l syslog -x error,noinfo,nostats -p \
-	    -a ${amd_dir} `cat ${amd_master}` > /var/run/amd.pid )
-fi
-
 # run rdate before timed/ntpd
 if [ X"${rdate_flags}" != X"NO" ]; then
 	echo -n ' rdate';	rdate -s ${rdate_flags}
@@ -459,29 +445,6 @@
 
 mount -a
 
-swapctl -A -t noblk
-
-# /var/crash should be a directory or a symbolic link
-# to the crash directory if core dumps are to be saved.
-if [ -d /var/crash ]; then
-	savecore ${savecore_flags} /var/crash
-fi
-
-if [ X"${afs}" = X"YES" -a -c /dev/xfs0 ]; then
-	echo -n 'mounting afs:'
-	mkdir -p -m 0755 /afs
-	mount -t xfs /dev/xfs0 /afs
-	/usr/libexec/afsd ${afsd_flags}
-	echo ' done.'
-fi
-
-if [ X"${check_quotas}" = X"YES" ]; then
-	echo -n 'checking quotas:'
-	quotacheck -a
-	echo ' done.'
-	quotaon -a
-fi
-
 # build ps databases
 echo -n 'building ps databases:'
 echo -n " kvm"
@@ -679,11 +642,6 @@
 	echo -n ' rwhod';		rwhod
 fi
 
-
-if [ X"${lpd_flags}" != X"NO" ]; then
-	echo -n ' lpd';			lpd ${lpd_flags}
-fi
-
 # We call sendmail with a full path so that SIGHUP works.
 # Note that /usr/sbin/sendmail may actually call a
 # mailer other than sendmail, depending on /etc/mailer.conf.
@@ -747,31 +705,10 @@
 
 echo '.'
 
-mixerctl_conf
-
-# KerberosV master KDC
-if [ X"${krb5_master_kdc}" = X"YES" ]; then
-	echo 'KerberosV master KDC'
-	/usr/libexec/kdc &
-	/usr/libexec/kadmind &
-	/usr/libexec/kpasswdd &
-fi
-
-# KerberosV slave KDC
-if [ X"${krb5_slave_kdc}" = X"YES" ]; then
-	echo 'KerberosV slave KDC'
-	/usr/libexec/kdc &
-	# Remember to enable hpropd in inetd.conf
-fi
-
 [ -f /etc/rc.local ] && . /etc/rc.local
 
 echo -n standard daemons:
 
-if [ X"${apmd_flags}" != X"NO" -a -x /usr/sbin/apmd ]; then
-	echo -n ' apmd';	/usr/sbin/apmd ${apmd_flags}
-fi
-
 if [ X"${sensorsd_flags}" != X"NO" ]; then
 	echo -n ' sensorsd';	/usr/sbin/sensorsd ${sensorsd_flags}
 fi
@@ -792,14 +729,5 @@
 echo '.'
 
 date
-
-if [ X"${wsmoused_flags}" != X"NO" -a -x /usr/sbin/wsmoused ]; then
-	echo 'starting wsmoused...';	/usr/sbin/wsmoused ${wsmoused_flags}
-fi
-
-# Alternatively, on some architectures, xdm may be started in /etc/ttys.
-if [ X"${xdm_flags}" != X"NO" ]; then
-	echo 'starting xdm...';		/usr/X11R6/bin/xdm ${xdm_flags}
-fi
 
 exit 0
