diff options
author | jkh <jkh@FreeBSD.org> | 1995-03-23 01:25:19 +0000 |
---|---|---|
committer | jkh <jkh@FreeBSD.org> | 1995-03-23 01:25:19 +0000 |
commit | eab2c349799b5be274b03a396e9730509da13f9d (patch) | |
tree | 7126f6e41646111a708031c8786f2ab5108c51a9 /etc | |
parent | 24d962fe5d54b4fd7dbc3c6a16411c0f406193bf (diff) | |
download | FreeBSD-src-eab2c349799b5be274b03a396e9730509da13f9d.zip FreeBSD-src-eab2c349799b5be274b03a396e9730509da13f9d.tar.gz |
Another pass through our rc files in an attempt to eliminate historical
crufy and generally make all of this easier to understand and modify.
Diffstat (limited to 'etc')
-rw-r--r-- | etc/rc | 181 | ||||
-rw-r--r-- | etc/rc.netstart | 141 | ||||
-rw-r--r-- | etc/sysconfig | 10 |
3 files changed, 166 insertions, 166 deletions
@@ -1,5 +1,5 @@ #!/bin/sh -# $Id: rc,v 1.49 1995/03/21 16:44:03 wollman Exp $ +# $Id: rc,v 1.50 1995/03/22 03:29:52 ache Exp $ # From: @(#)rc 5.27 (Berkeley) 6/5/91 # System startup script run by init on autoboot @@ -81,179 +81,28 @@ if [ -f /etc/rc.serial ]; then sh /etc/rc.serial fi -# set hostname, turn on network -echo 'starting network' -. /etc/netstart - -# clean up left-over files -rm -f /etc/nologin -rm -f /var/spool/lock/* -rm -f /var/spool/uucp/.Temp/* -(cd /var/run && { rm -rf -- *; cp /dev/null utmp; chmod 644 utmp; }) - -echo -n ' system logger' -rm -f /dev/log -syslogd - -# $timedflags is imported from /etc/sysconfig; -# if $timedflags == NO, timed isn't run. -if [ "X${timedflags}" != X"NO" ]; then - echo -n ' time daemon'; timed $timedflags -fi -echo '.' - -# /var/crash should be a directory or a symbolic link -# to the crash directory if core dumps are to be saved. -if [ "X${savecore}" = X"YES" -a -d /var/crash ]; then - echo; echo -n checking for core dump... - savecore /var/crash - echo done. -fi - -if [ "X${check_quotas}" = X"YES" ]; then - echo ' checking quotas:' - quotacheck -a - echo ' done.' - quotaon -a -fi - -# build ps databases -kvm_mkdb -dev_mkdb - -# snapshot any kernel -c changes back to disk -/sbin/dset -q - -chmod 666 /dev/tty[pqrs]* - -# check the password temp/lock file -if [ -f /etc/ptmp ] -then - logger -s -p auth.err \ - 'password file may be incorrect -- /etc/ptmp exists' +# start up the network +if [ -f /etc/rc.netstart ]; then + sh /etc/rc.netstart fi -# Recover vi editor files. -virecovery=/var/tmp/vi.recover/recover.* -if [ "$virecovery" != "/var/tmp/vi.recover/recover.*" ]; then - echo 'Recovering vi editor sessions' - for i in $virecovery; do - sendmail -t < $i - done -fi - -echo clearing /tmp - -# prune quickly with one rm, then use find to clean up /tmp/[lq]* -# (not needed with mfs /tmp, but doesn't hurt there...) -(cd /tmp && rm -rf [a-km-pr-zA-Z]* && - find -d . ! -name . ! -name lost+found ! -name quotas -exec rm -rf -- {} \;) - -if [ "X${accounting}" = X"YES" -a -d /var/account ]; then - echo 'turning on accounting'; accton /var/account/acct +# Do system maintainance functions. +if [ -f /etc/rc.maint ]; then + sh /etc/rc.maint fi +# Now start up miscellaneous daemons that don't belong anywhere else +# echo -n standard daemons: echo -n ' cron'; cron -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/sysconfig. -# If $gated == YES, gated is used; otherwise routed. -# If $routedflags == NO, routed isn't run. -if [ "X${gated}" = X"YES" -a -r /etc/gated.conf ]; then - echo -n ' gated'; gated $gatedflags -elif [ "X${routedflags}" != X"NO" ]; then - echo -n ' routed'; routed $routedflags -fi - -# $namedflags is imported from /etc/sysconfig -if [ "X${namedflags}" != "XNO" ]; then - echo -n ' named'; named $namedflags -fi - -# $ntpdate and $xntpdflags are imported from /etc/sysconfig. -# If $ntpdate != NO, run ntpdate $ntpdate to set the date correctly. -# If $xntpdflags != NO, start xntpd. -if [ "X${ntpdate}" != X"NO" -o "X${xntpdflags}" != X"NO" ]; then - if [ "X${tickadjflags}" != X"NO" ]; then - echo -n ' tickadj'; tickadj ${tickadjflags--Aq} - fi - - if [ "X${ntpdate}" != X"NO" ]; then - echo -n ' ntpdate'; ntpdate ${ntpdate} - fi - - if [ "X${xntpdflags}" != X"NO" ]; then - echo -n ' xntpd'; xntpd ${xntpdflags} - fi -fi - -# $rwhod is imported from /etc/sysconfig; -# if $rwhod is set to YES, rwhod is run. -if [ "X${rwhod}" = X"YES" ]; then - echo -n ' rwhod'; rwhod -fi - -echo -n ' printer'; lpd - -if [ "X${nfs_server}" = X"YES" -a -r /etc/exports ]; then - echo -n ' mountd'; mountd - echo -n ' nfsd'; nfsd -u -t 4 -fi - -if [ "X${nfs_client}" = X"YES" ]; then - echo -n ' nfsiod'; nfsiod -n 4 -fi - -if [ "X${amdflags}" != X"NO" ]; then - echo -n ' amd'; amd ${amdflags} -fi - -# $sendmail_flags is imported from /etc/sysconfig; -# 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 - -# Kerberos runs ONLY on the Kerberos server machine -if [ "X${kerberos_server}" = X"YES" ]; then - echo -n ' kerberos'; kerberos >> /var/log/kerberos.log & - echo -n ' kadmind'; \ - (sleep 20; /usr/sbin/kadmind -n >/dev/null 2>&1 &) & -fi - -# Start ypserv if we're an NIS server. -# Run yppasswdd only on the NIS master server -if [ "X${nis_serverflags}" != X"NO" ]; then - echo -n ' ypserv'; ypserv ${nis_serverflags} - - if [ "X${yppasswddflags}" != X"NO" ]; then - echo -n ' yppasswdd'; yppasswdd ${yppasswddflags} - fi -fi - - -# Start ypbind if we're an NIS client -if [ "X${nis_clientflags}" != X"NO" ]; then - echo -n ' ypbind'; ypbind ${nis_clientflags} +if [ "X${xtend}" != X"NO" -a -x /usr/libexec/xtend ]; then + echo -n ' xtend'; /usr/libexec/xtend fi - -echo -n ' inetd'; inetd +echo -n ' printer'; lpd echo '.' mount -a -t nfs >/dev/null 2>&1 & # XXX shouldn't need background -if [ "X${xtend}" != X"NO" -a -x /usr/libexec/xtend ]; then - echo -n ' xtend'; /usr/libexec/xtend -fi - # Make shared lib searching a little faster. Leave /usr/lib first if you # add your own entries or you may come to grief. if [ -x /sbin/ldconfig ]; then @@ -336,8 +185,10 @@ fi ######################### End Of Syscons Section ####################### -. /etc/rc.local +# Do traditional (but rather obsolete) rc.local file if it exists. +if [ -f /etc/rc.local ]; then + sh /etc/rc.local +fi date - exit 0 diff --git a/etc/rc.netstart b/etc/rc.netstart new file mode 100644 index 0000000..7a211f4 --- /dev/null +++ b/etc/rc.netstart @@ -0,0 +1,141 @@ +#!/bin/sh - +# +# $Id: netstart,v 1.23 1995/03/22 18:00:35 jkh Exp $ +# From: @(#)netstart 5.9 (Berkeley) 3/30/91 + +# my-name is my symbolic name +# my-netmask is specified in /etc/networks +# +if [ -z "`hostname -s`" ] ; then + hostname $hostname +fi + +# Set the domainname if we're using NIS +if [ -z "`domainname`" -a -e "/etc/defaultdomain" ] ; then + domainname=`cat /etc/defaultdomain` + domainname $domainname +fi + +for i in /etc/hostname.* +do + ifn=`expr $i : '/etc/hostname\.\(.*\)'` + if [ -e /etc/hostname.$ifn ]; then + if [ -e /etc/start_if.$ifn ]; then + sh /etc/start_if.$ifn $ifn + fi + ifconfig $ifn `cat /etc/hostname.$ifn` + ifconfig $ifn + fi +done + +# set the address for the loopback interface +ifconfig lo0 inet localhost + +# set interface for multicasts to default interface +# this needs to happen before router discovery +route add 224.0.0.0 -netmask 0xf0000000 -interface $hostname + +if [ -n "$defaultrouter" -a "x$defaultrouter" != "xNO" ] ; then + route add default $defaultrouter +elif [ -f /etc/defaultrouter ] ; then + route add default `cat /etc/defaultrouter` +fi + +# use loopback, not the wire +# route add $hostname localhost + +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/sysconfig. +# If $gated == YES, gated is used; otherwise routed. +# If $routedflags == NO, routed isn't run. +if [ "X${gated}" = X"YES" -a -r /etc/gated.conf ]; then + echo -n ' gated'; gated $gatedflags +elif [ "X${routedflags}" != X"NO" ]; then + echo -n ' routed'; routed $routedflags +fi + +# $namedflags is imported from /etc/sysconfig +if [ "X${namedflags}" != "XNO" ]; then + echo -n ' named'; named $namedflags +fi + +# $ntpdate and $xntpdflags are imported from /etc/sysconfig. +# If $ntpdate != NO, run ntpdate $ntpdate to set the date correctly. +# If $xntpdflags != NO, start xntpd. +if [ "X${ntpdate}" != X"NO" -o "X${xntpdflags}" != X"NO" ]; then + if [ "X${tickadjflags}" != X"NO" ]; then + echo -n ' tickadj'; tickadj ${tickadjflags--Aq} + fi + + if [ "X${ntpdate}" != X"NO" ]; then + echo -n ' ntpdate'; ntpdate ${ntpdate} + fi + + if [ "X${xntpdflags}" != X"NO" ]; then + echo -n ' xntpd'; xntpd ${xntpdflags} + fi +fi + +# $timedflags is imported from /etc/sysconfig; +# if $timedflags == NO, timed isn't run. +if [ "X${timedflags}" != X"NO" ]; then + echo -n ' timed'; timed $timedflags +fi + +# $rwhod is imported from /etc/sysconfig; +# if $rwhod is set to YES, rwhod is run. +if [ "X${rwhod}" = X"YES" ]; then + echo -n ' rwhod'; rwhod +fi + +if [ "X${nfs_server}" = X"YES" -a -r /etc/exports ]; then + echo -n ' mountd'; mountd + echo -n ' nfsd'; nfsd -u -t 4 +fi + +if [ "X${nfs_client}" = X"YES" ]; then + echo -n ' nfsiod'; nfsiod -n 4 +fi + +if [ "X${amdflags}" != X"NO" ]; then + echo -n ' amd'; amd ${amdflags} +fi + +# $sendmail_flags is imported from /etc/sysconfig; +# 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 + +# Kerberos runs ONLY on the Kerberos server machine +if [ "X${kerberos_server}" = X"YES" ]; then + echo -n ' kerberos'; kerberos >> /var/log/kerberos.log & + echo -n ' kadmind'; \ + (sleep 20; /usr/sbin/kadmind -n >/dev/null 2>&1 &) & +fi + +# Start ypserv if we're an NIS server. +# Run yppasswdd only on the NIS master server +if [ "X${nis_serverflags}" != X"NO" ]; then + echo -n ' ypserv'; ypserv ${nis_serverflags} + + if [ "X${yppasswddflags}" != X"NO" ]; then + echo -n ' yppasswdd'; yppasswdd ${yppasswddflags} + fi +fi + + +# Start ypbind if we're an NIS client +if [ "X${nis_clientflags}" != X"NO" ]; then + echo -n ' ypbind'; ypbind ${nis_clientflags} +fi + +echo -n ' inetd'; inetd +echo '.' + diff --git a/etc/sysconfig b/etc/sysconfig index d582b84..8c6df7e 100644 --- a/etc/sysconfig +++ b/etc/sysconfig @@ -4,7 +4,7 @@ # This is sysconfig - a file full of useful variables that you can set # to change the default startup behavior of your system. # -# $Id: sysconfig,v 1.3 1995/03/22 03:29:55 ache Exp $ +# $Id: sysconfig,v 1.4 1995/03/22 18:00:36 jkh Exp $ ######################### Start Of Syscons Section ####################### @@ -130,3 +130,11 @@ accounting=NO # Uncomment next line to activate italian locale # LANG=it_IT.ISO8859-1; export LANG # For full list of locales, check /usr/share/locale/* + +######################### End Of Netconfig Section ####################### + +######################### Start Of Misc Section ####################### + +# Set to YES if you want ibcs2 emulation loaded at startup +ibcs2=NO + |