Semi-major RC file cleanup:

- Do ntp right
- Move recenrly-added and long-standing junk from rc.local into rc, so
. that rc.local truly is LOCAL.
- Fix named invocation to use the correct boot file location.
This commit is contained in:
Garrett Wollman 1995-03-16 16:58:01 +00:00
parent d99c7a23fa
commit 9d3b840f0a
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=7084
3 changed files with 42 additions and 40 deletions

View File

@ -1,13 +1,15 @@
#!/bin/sh -
#
# $Id: netstart,v 1.19 1995/02/07 20:52:35 ats Exp $
# $Id: netstart,v 1.20 1995/02/08 16:42:12 wpaul Exp $
# From: @(#)netstart 5.9 (Berkeley) 3/30/91
defaultrouter=NO
routedflags=-q
timedflags=NO
xntpdflags="NO"
tickadj="-Aq" # this is inoperative unless xntpd is enabled; NO to disable
ntpdate="NO"
#ntpdate="-b -s ntp-0 ntp-1 ntp-2"
rwhod=NO
sendmail_flags="-bd -q30m"
amdflags="NO"

53
etc/rc
View File

@ -1,5 +1,5 @@
#!/bin/sh
# $Id: rc,v 1.44 1995/01/24 16:49:14 jkh Exp $
# $Id: rc,v 1.45 1995/01/26 19:04:29 jkh Exp $
# From: @(#)rc 5.27 (Berkeley) 6/5/91
# System startup script run by init on autoboot
@ -175,26 +175,25 @@ elif [ X"${routedflags}" != X"NO" ]; then
echo -n ' routed'; routed $routedflags
fi
if [ X${name_server} = X"YES" -a -r /etc/named.boot ]; then
echo -n ' named'; named
if [ X${name_server} = X"YES" -a -r /etc/namedb/named.boot ]; then
echo -n ' named'; named -b /etc/namedb/named.boot
fi
# $ntpdate and $xntpdflags are imported from /etc/netstart.
# If $ntpdate != NO, run ntpdate $ntpdate to set the date correctly.
# If $xntpdflags != NO, start xntpd.
if [ X"${ntpdate}" != X"NO" ]; then
echo ' ntpdate'; ntpdate $ntpdate
fi
if [ X"${xntpdflags}" != X"NO" ]; then
if [ X"${tickadjflags}" != X"NO" ]; then
echo 'adjusting kernel for xntpd'; tickadj ${tickadjflags--A}
fi
echo 'starting xntpd'; xntpd ${xntpdflags}
fi
if [ X"${ntpdate}" != X"NO" -o X"${xntpdflags}" != X"NO" ]; then
echo -n 'starting more network daemons:'
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/netstart;
@ -224,6 +223,30 @@ 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
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 '.'

View File

@ -1,7 +1,7 @@
#
# site-specific startup actions, daemons
#
# @(#)rc.local 5.4 (Berkeley) 12/14/90
# $Id$
#
T=/tmp/_motd
@ -16,29 +16,6 @@ _HOST=`hostname`
echo -n 'starting local daemons:'
# Kerberos runs ONLY on the Kerberos server machine
if [ X"${kerberos_server}" = X"YES" ]; then
echo -n ' kerberos'; kerberos >> /var/log/kerberos.log &
if [ -x /usr/sbin/kadmind ]; then
echo -n ' kadmind'; (sleep 20; /usr/sbin/kadmind -n >/dev/null 2>&1 &) &
fi
fi
# Start ypserv if we're an NIS server.
if [ X"${nis_serverflags}" != X"NO" ]; then
echo -n ' ypserv'; ypserv $nis_serverflags
fi
# Run yppasswdd only on the NIS master server
if [ X"${yppasswddflags}" != X"NO" ]; then
echo -n ' yppasswdd'; yppasswdd $yppasswddflags
fi
# Start ypbind if we're an NIS client
if [ X"${nis_clientflags}" != X"NO" ]; then
echo -n ' ypbind'; ypbind $nis_clientflags
fi
# For loading fonts/keyboard example look in /usr/share/examples/syscons
# directory