Fix sendmail_flags, long ago it was imported from /etc/netstart
[unix-history] / etc / rc
diff --git a/etc/rc b/etc/rc
index de25fd7..4e2cee7 100644 (file)
--- a/etc/rc
+++ b/etc/rc
@@ -1,4 +1,6 @@
-#      @(#)rc  5.27 (Berkeley) 6/5/91
+#!/bin/sh
+#      $Id: rc,v 1.9 1993/12/17 04:20:30 ache Exp $
+#      From: @(#)rc    5.27 (Berkeley) 6/5/91
 
 # System startup script run by init on autoboot
 # or after single-user.
 
 # System startup script run by init on autoboot
 # or after single-user.
@@ -6,8 +8,6 @@
 # and the console is the controlling terminal.
 
 stty status '^T'
 # and the console is the controlling terminal.
 
 stty status '^T'
-# yellow characters with blue background
-echo -n "\e[3;30x"
 
 # Set shell to ignore SIGINT (2), but not children;
 # shell catches SIGQUIT (3) and returns to single user after fsck.
 
 # Set shell to ignore SIGINT (2), but not children;
 # shell catches SIGQUIT (3) and returns to single user after fsck.
@@ -18,7 +18,7 @@ HOME=/; export HOME
 PATH=/sbin:/bin:/usr/sbin:/usr/bin
 export PATH
 
 PATH=/sbin:/bin:/usr/sbin:/usr/bin
 export PATH
 
-if [ -r /fastboot ]
+if [ -e /fastboot ]
 then
        echo Fast boot ... skipping disk checks
 elif [ $1x = autobootx ]
 then
        echo Fast boot ... skipping disk checks
 elif [ $1x = autobootx ]
@@ -63,6 +63,12 @@ umount -a >/dev/null 2>&1
 mount -a -t nonfs
 rm -f /fastboot                # XXX (root now writeable)
 
 mount -a -t nonfs
 rm -f /fastboot                # XXX (root now writeable)
 
+# If the machine runs wall CMOS clock (compatible with MSDOS),
+# activate following line by creating empty file /etc/wall_cmos_clock
+# If this file not exist, following line does nothing (assumed
+# the machine runs UTC CMOS clock). See adjkerntz(8) for details.
+adjkerntz -i
+
 # set hostname, turn on network
 echo 'starting network'
 . /etc/netstart
 # set hostname, turn on network
 echo 'starting network'
 . /etc/netstart
@@ -75,6 +81,10 @@ rm -f /var/spool/uucp/LCK.*
 rm -f /var/spool/uucp/STST/*
 (cd /var/run && { rm -rf -- *; cp /dev/null utmp; chmod 644 utmp; })
 
 rm -f /var/spool/uucp/STST/*
 (cd /var/run && { rm -rf -- *; cp /dev/null utmp; chmod 644 utmp; })
 
+if [ -x /sbin/ldconfig ]; then
+       ldconfig /usr/X386/lib
+fi
+
 echo -n 'starting system logger'
 rm -f /dev/log
 syslogd
 echo -n 'starting system logger'
 rm -f /dev/log
 syslogd
@@ -126,12 +136,16 @@ echo clearing /tmp
 # echo 'turning on accounting';        accton /var/account/acct
 
 echo -n standard daemons:
 # echo 'turning on accounting';        accton /var/account/acct
 
 echo -n standard daemons:
-echo -n ' update';             update
 echo -n ' crond';              /usr/libexec/crond
 echo '.'
 
 echo -n starting network daemons:
 
 echo -n ' crond';              /usr/libexec/crond
 echo '.'
 
 echo -n starting network daemons:
 
+# Portmapper should always be run, to provide RPC services for inetd.
+if [ -x /usr/sbin/portmap ]; then
+       echo -n ' portmap';             portmap
+fi
+
 # $gated and $routedflags are imported from /etc/netstart.
 # If $gated == YES, gated is used; otherwise routed.
 # If $routedflags == NO, routed isn't run.
 # $gated and $routedflags are imported from /etc/netstart.
 # If $gated == YES, gated is used; otherwise routed.
 # If $routedflags == NO, routed isn't run.
@@ -153,15 +167,18 @@ fi
 
 echo -n ' printer';            lpd
 
 
 echo -n ' printer';            lpd
 
-
 if [ X${nfs_server} = X"YES" -a -r /etc/exports ]; then
 if [ X${nfs_server} = X"YES" -a -r /etc/exports ]; then
-       echo -n ' portmap';             portmap
        echo -n ' mountd';              mountd
        echo -n ' nfsd';                nfsd -u 0,0,4 -t 0,0
        echo -n ' nfsiod';              nfsiod 4
 fi
 
        echo -n ' mountd';              mountd
        echo -n ' nfsd';                nfsd -u 0,0,4 -t 0,0
        echo -n ' nfsiod';              nfsiod 4
 fi
 
-echo -n ' sendmail';           sendmail -bd -q30m
+# $sendmail_flags is imported from /etc/netstart;
+# if $sendmail_flags is something other than NO, sendmail is run.
+if [ X"${sendmail_flags}" != X"NO" -a -r /etc/sendmail.cf ]; then
+       echo -n ' sendmail';            sendmail ${sendmail_flags} 
+fi
+
 echo -n ' inetd';              inetd
 echo '.'
 
 echo -n ' inetd';              inetd
 echo '.'
 
@@ -169,6 +186,4 @@ sh /etc/rc.local
 
 date
 
 
 date
 
-# reset to normal (no colors)
-echo -n "\e[0x"
 exit 0
 exit 0