Annotation of src/etc/rc, Revision 1.164
1.164 ! deraadt 1: # $OpenBSD: rc,v 1.163 2001/02/22 08:03:22 deraadt Exp $
1.1 deraadt 2:
3: # System startup script run by init on autoboot
4: # or after single-user.
5: # Output and error are redirected to console by init,
6: # and the console is the controlling terminal.
7:
1.131 millert 8: # Subroutines (have to come first).
9:
10: # Strip comments (and leading/trailing whitespace if IFS is set)
11: # from a file and spew to stdout
12: stripcom() {
13: local _file="$1"
14: local _line
15:
16: {
17: while read _line ; do
18: _line=${_line%%#*} # strip comments
19: test -z "$_line" && continue
20: echo $_line
21: done
22: } < $_file
23: }
24:
25: # End subroutines
26:
1.1 deraadt 27: stty status '^T'
28:
29: # Set shell to ignore SIGINT (2), but not children;
30: # shell catches SIGQUIT (3) and returns to single user after fsck.
31: trap : 2
32: trap : 3 # shouldn't be needed
33:
34: HOME=/; export HOME
35: PATH=/sbin:/bin:/usr/sbin:/usr/bin
36: export PATH
1.108 deraadt 37:
38: if [ $1x = shutdownx ]; then
39: dd if=/dev/urandom of=/var/db/host.random bs=1024 count=64 >/dev/null 2>&1
40: chmod 600 /var/db/host.random >/dev/null 2>&1
41: if [ $? -eq 0 -a -f /etc/rc.shutdown ]; then
42: echo /etc/rc.shutdown in progress...
43: . /etc/rc.shutdown
44: echo /etc/rc.shutdown complete.
45: if [ "X${powerdown}" = X"YES" ]; then
46: exit 2
47: fi
48: else
49: echo single user: not running /etc/rc.shutdown
50: fi
51: exit 0
52: fi
1.1 deraadt 53:
54: # Configure ccd devices.
1.17 deraadt 55: if [ -f /etc/ccd.conf ]; then
1.1 deraadt 56: ccdconfig -C
57: fi
1.98 jakob 58:
59: # Configure raid devices.
60: for dev in 0 1 2 3; do
61: if [ -f /etc/raid$dev.conf ]; then
62: raidctl -c /etc/raid$dev.conf raid$dev
1.158 angelos 63: raidctl -v -P raid$dev
1.98 jakob 64: fi
65: done
1.1 deraadt 66:
1.17 deraadt 67: if [ -e /fastboot ]; then
1.1 deraadt 68: echo "Fast boot: skipping disk checks."
1.17 deraadt 69: elif [ $1x = autobootx ]; then
1.1 deraadt 70: echo "Automatic boot in progress: starting file system checks."
1.31 millert 71: fsck -p
1.1 deraadt 72: case $? in
73: 0)
74: ;;
75: 2)
76: exit 1
77: ;;
78: 4)
79: echo "Rebooting..."
80: reboot
81: echo "Reboot failed; help!"
82: exit 1
83: ;;
84: 8)
85: echo "Automatic file system check failed; help!"
86: exit 1
87: ;;
88: 12)
89: echo "Boot interrupted."
90: exit 1
91: ;;
92: 130)
93: # interrupt before catcher installed
94: exit 1
95: ;;
96: *)
97: echo "Unknown error; help!"
98: exit 1
99: ;;
100: esac
101: fi
102:
103: trap "echo 'Boot interrupted.'; exit 1" 3
104:
105: swapon -a
106:
107: umount -a >/dev/null 2>&1
108: mount -a -t nonfs
1.57 niklas 109: mount -uw / # root on nfs requires this, others aren't hurt
1.1 deraadt 110: rm -f /fastboot # XXX (root now writeable)
111:
112: # set flags on ttys. (do early, in case they use tty for SLIP in netstart)
113: echo 'setting tty flags'
114: ttyflags -a
1.77 angelos 115:
1.126 deraadt 116: if [ -f /etc/sysctl.conf ]; then
117: (
118: # delete comments and blank lines
1.131 millert 119: set -- `stripcom /etc/sysctl.conf`
1.126 deraadt 120: while [ $# -ge 1 ] ; do
121: sysctl -w $1
1.129 millert 122: shift
1.126 deraadt 123: done
124: )
125: fi
126:
1.1 deraadt 127: # set hostname, turn on network
128: echo 'starting network'
129: . /etc/netstart
130:
131: mount /usr >/dev/null 2>&1
132: mount /var >/dev/null 2>&1
1.149 deraadt 133:
134: # if there's no /var/db/host.random, make one through /dev/urandom
135: if [ ! -f /var/db/host.random ]; then
136: dd if=/dev/urandom of=/var/db/host.random bs=1024 count=64 \
137: >/dev/null 2>&1
138: chmod 600 /var/db/host.random >/dev/null 2>&1
139: else
140: dd if=/var/db/host.random of=/dev/urandom bs=1024 count=64 \
141: > /dev/null 2>&1
142: dd if=/var/db/host.random of=/dev/arandom bs=1024 count=64 \
143: > /dev/null 2>&1
144: fi
1.157 deraadt 145:
146: # reset seed file, so that if a shutdown-less reboot occurs,
147: # the next seed is not a repeat
148: dd if=/dev/urandom of=/var/db/host.random bs=1024 count=64 \
149: > /dev/null 2>&1
1.29 deraadt 150:
1.55 deraadt 151: # clean up left-over files
152: rm -f /etc/nologin
153: rm -f /var/spool/lock/LCK.*
154: rm -f /var/spool/uucp/STST/*
155: (cd /var/run && { rm -rf -- *; install -c -m 664 -g utmp /dev/null utmp; })
1.96 alex 156:
157: # save a copy of the boot messages
158: dmesg >/var/run/dmesg.boot
1.55 deraadt 159:
1.58 deraadt 160: echo 'starting system logger'
161: rm -f /dev/log
1.76 millert 162: if [ "X${named_flags}" != X"NO" -a "X${named_chroot}" != "X" ]; then
1.74 millert 163: rm -f ${named_chroot}/dev/log
164: syslogd_flags="${syslogd_flags} -a ${named_chroot}/dev/log"
165: fi
1.65 marc 166: syslogd ${syslogd_flags}
1.89 todd 167:
1.74 millert 168: # $named_flags, $named_user, and $named_chroot are imported from /etc/rc.conf;
1.54 deraadt 169: # if $named_flags != NO, named is run.
170: if [ "X${named_flags}" != X"NO" ]; then
1.74 millert 171: if [ "X${named_user}" != "X" -a "X${named_user}" != X"root" ]; then
172: named_flags="-u ${named_user} ${named_flags}"
173: fi
1.75 millert 174: if [ "X${named_chroot}" != "X" ]; then
1.81 millert 175: if [ ! -c "${named_chroot}/dev/null" ]; then
176: ( cd /dev ; pax -rw -pe null ${named_chroot}/dev )
1.83 millert 177: fi
178: if [ -f /etc/localtime -a -d "${named_chroot}/etc" ]; then
179: cmp -s /etc/localtime "${named_chroot}/etc/localtime" \
180: || cp -p /etc/localtime "${named_chroot}/etc/localtime"
1.81 millert 181: fi
1.74 millert 182: named_flags="-t ${named_chroot} ${named_flags}"
183: fi
1.58 deraadt 184: echo 'starting named'; named $named_flags
1.29 deraadt 185: fi
1.1 deraadt 186:
1.5 dm 187: if [ X"${ipfilter}" = X"YES" -a X"${ipmon_flags}" != X"NO" ]; then
1.43 mickey 188: echo 'starting ipmon'; ipmon ${ipmon_flags}
1.25 deraadt 189: fi
190:
1.52 deraadt 191: # $photurisd_flags is imported from /etc/rc.conf;
1.45 kstailey 192: # If $photurisd_flags == NO or /etc/photuris/photuris.conf doesn't exist, then
1.40 provos 193: # photurisd isn't run.
1.45 kstailey 194: if [ "X${photurisd_flags}" != X"NO" -a -e /etc/photuris/photuris.conf ]; then
1.40 provos 195: echo 'starting photurisd'; photurisd ${photurisd_flags}
1.94 deraadt 196: fi
197:
198: # $isakmpd_flags is imported from /etc/rc.conf;
1.125 deraadt 199: # If $isakmpd_flags == NO or /etc/isakmpd/isakmpd.conf doesn't exist, then
1.94 deraadt 200: # isakmpd isn't run.
1.125 deraadt 201: if [ "X${isakmpd_flags}" != X"NO" -a -e /etc/isakmpd/isakmpd.conf ]; then
1.94 deraadt 202: echo 'starting isakmpd'; isakmpd ${isakmpd_flags}
1.40 provos 203: fi
1.1 deraadt 204:
205: echo -n 'starting rpc daemons:'
1.24 millert 206:
1.52 deraadt 207: # $portmap is imported from /etc/rc.conf;
1.24 millert 208: # if $portmap == YES, the portmapper is started.
209: if [ X"${portmap}" = X"YES" ]; then
1.23 deraadt 210: echo -n ' portmap'; portmap
211: fi
1.1 deraadt 212:
1.9 deraadt 213: if [ -d /var/yp/binding ]; then
1.8 deraadt 214: if [ -d /var/yp/`domainname` ]; then
215: # yp server capabilities needed...
1.36 niklas 216: echo -n ' ypserv'; ypserv ${ypserv_flags}
1.16 deraadt 217: #echo -n ' ypxfrd'; ypxfrd
1.21 deraadt 218: fi
219:
220: echo -n ' ypbind'; ypbind
1.8 deraadt 221:
1.21 deraadt 222: if [ -d /var/yp/`domainname` ]; then
1.8 deraadt 223: # if we are the master server, run rpc.yppasswdd
224: _host1=`ypwhich -m passwd 2> /dev/null`
225: _host2=`hostname`
1.15 deraadt 226: if [ `grep '^lookup' /etc/resolv.conf | grep yp | wc -c` -ne 0 ]; then
1.8 deraadt 227: _host1=`ypmatch $_host1 hosts | cut -d' ' -f2`
228: _host2=`ypmatch $_host2 hosts | cut -d' ' -f2 | head -1`
229: else
230: _host1=`nslookup $_host1 | grep '^Name: ' | \
231: sed -e 's/^Name: //'`
232: _host2=`nslookup $_host2 | grep '^Name: ' | \
233: sed -e 's/^Name: //'`
234: fi
1.13 deraadt 235: if [ "$_host2" = "$_host1" ]; then
1.35 niklas 236: echo -n ' rpc.yppasswdd'
237: rpc.yppasswdd ${yppasswdd_flags}
1.8 deraadt 238: fi
1.7 deraadt 239: fi
1.1 deraadt 240: fi
241:
1.52 deraadt 242: # $nfs_server is imported from /etc/rc.conf;
1.1 deraadt 243: # if $nfs_server == YES, the machine is setup for being an nfs server
1.67 millert 244: if [ X${nfs_server} = X"YES" -a -s /etc/exports -a \
1.141 deraadt 245: `sed -e '/^#/d' < /etc/exports | wc -l` -ne 0 ]; then
1.68 millert 246: rm -f /var/db/mountdtab
1.1 deraadt 247: echo -n > /var/db/mountdtab
248: echo -n ' mountd'; mountd
1.42 niklas 249: echo -n ' nfsd'; nfsd ${nfsd_flags}
250: if [ X${lockd} = X"YES" ]; then
251: echo -n ' rpc.lockd'; rpc.lockd
252: fi
1.1 deraadt 253: fi
254:
1.67 millert 255: if [ X${amd} = X"YES" -a -d ${amd_dir} -a -e ${amd_master} ]; then
1.1 deraadt 256: echo -n ' amd'
1.164 ! deraadt 257: if [ ! -d ${amd_dir} ]; then
! 258: mkdir -p -m 755 ${amd_dir}
! 259: fi
1.107 deraadt 260: (cd /etc/amd; amd -l syslog -x error,noinfo,nostats -p \
261: -a ${amd_dir} `cat ${amd_master}` > /var/run/amd.pid )
1.146 matt 262: fi
263:
264: # run rdate before timed
1.148 millert 265: if [ X"${rdate_flags}" != X"NO" ]; then
1.146 matt 266: echo -n ' rdate'; rdate -s ${rdate_flags}
1.1 deraadt 267: fi
268:
1.52 deraadt 269: # $timed_flags is imported from /etc/rc.conf;
1.1 deraadt 270: # if $timed_flags == NO, timed isn't run.
271: if [ "X${timed_flags}" != X"NO" ]; then
1.58 deraadt 272: echo -n ' timed'; timed $timed_flags
1.1 deraadt 273: fi
274: echo '.'
1.58 deraadt 275:
276: mount -a -t nfs
1.1 deraadt 277:
278: # /var/crash should be a directory or a symbolic link
279: # to the crash directory if core dumps are to be saved.
280: if [ -d /var/crash ]; then
281: savecore /var/crash
282: fi
283:
1.90 art 284: if [ "X${afs}" = X"YES" -a -c ${afs_device} -a -d ${afs_mount_point} ]; then
285: echo -n 'mounting afs:'
1.91 art 286: mount -t xfs ${afs_device} ${afs_mount_point}
1.90 art 287: /usr/libexec/afsd ${afsd_flags} -d ${afs_device}
288: echo ' done.'
289: fi
290:
1.41 downsj 291: if [ "X${check_quotas}" = X"YES" ]; then
292: echo -n 'checking quotas:'
293: quotacheck -a
294: echo ' done.'
295: quotaon -a
296: fi
1.1 deraadt 297:
298: # build ps databases
1.95 deraadt 299: echo -n 'building ps databases:'
300: echo -n " kvm"
1.88 millert 301: kvm_mkdb
1.95 deraadt 302: echo -n " dev"
1.1 deraadt 303: dev_mkdb
1.95 deraadt 304: echo "."
1.1 deraadt 305:
1.101 deraadt 306: chmod 666 /dev/tty[pqrstuvwxyzPQRST]*
307: chown root.wheel /dev/tty[pqrstuvwxyzPQRST]*
1.1 deraadt 308:
309: # check the password temp/lock file
1.17 deraadt 310: if [ -f /etc/ptmp ]; then
1.1 deraadt 311: logger -s -p auth.err \
312: 'password file may be incorrect -- /etc/ptmp exists'
1.32 deraadt 313: fi
314:
1.49 millert 315: echo clearing /tmp
316:
317: # prune quickly with one rm, then use find to clean up /tmp/[lq]*
318: # (not needed with mfs /tmp, but doesn't hurt there...)
319: (cd /tmp && rm -rf [a-km-pr-zA-Z]* &&
320: find . ! -name . ! -name lost+found ! -name quota.user \
1.103 millert 321: ! -name quota.group -execdir rm -rf -- {} \; -type d -prune)
1.49 millert 322:
1.72 deraadt 323: [ -f /etc/rc.securelevel ] && . /etc/rc.securelevel
1.32 deraadt 324: if [ X${securelevel} != X"" ]; then
1.33 millert 325: echo -n 'setting kernel security level: '
1.32 deraadt 326: sysctl -w kern.securelevel=${securelevel}
1.1 deraadt 327: fi
328:
1.34 deraadt 329: # patch /etc/motd
330: if [ ! -f /etc/motd ]; then
331: install -c -o root -g wheel -m 664 /dev/null /etc/motd
332: fi
1.131 millert 333: T=`mktemp /tmp/_motd.XXXXXXXXXX`
1.105 millert 334: if [ $? -eq 0 ]; then
1.102 millert 335: sysctl -n kern.version | sed 1q > $T
336: echo "" >> $T
337: sed '1,/^$/d' < /etc/motd >> $T
338: cmp -s $T /etc/motd || cp $T /etc/motd
339: rm -f $T
340: fi
1.34 deraadt 341:
1.121 millert 342: if [ -x /usr/libexec/vi.recover ]; then
343: echo 'preserving editor files'; /usr/libexec/vi.recover
1.1 deraadt 344: fi
345:
346: if [ -f /var/account/acct ]; then
347: echo 'turning on accounting'; accton /var/account/acct
348: fi
349:
1.115 deraadt 350: if [ -f /sbin/ldconfig ]; then
351: echo 'creating runtime link editor directory cache.'
352: if [ -d /usr/local/lib ]; then
353: shlib_dirs="$shlib_dirs /usr/local/lib"
354: fi
355: if [ -d /usr/X11R6/lib ]; then
356: shlib_dirs="$shlib_dirs /usr/X11R6/lib"
357: fi
358: ldconfig $shlib_dirs
359: fi
360:
1.150 deraadt 361: if [ ! -f /etc/ssh_host_dsa_key ]; then
1.133 deraadt 362: echo -n "ssh-keygen: generating new DSA host key... "
1.163 deraadt 363: if /usr/bin/ssh-keygen -q -t dsa -f /etc/ssh_host_dsa_key -N ''; then
364: echo done.
365: else
366: echo failed.
367: fi
368: fi
369: if [ ! -f /etc/ssh_host_rsa_key ]; then
370: echo -n "ssh-keygen: generating new RSA host key... "
371: if /usr/bin/ssh-keygen -q -t rsa -f /etc/ssh_host_rsa_key -N ''; then
1.133 deraadt 372: echo done.
373: else
374: echo failed.
375: fi
376: fi
1.150 deraadt 377: if [ ! -f /etc/ssh_host_key ]; then
1.133 deraadt 378: echo -n "ssh-keygen: generating new RSA host key... "
1.163 deraadt 379: if /usr/bin/ssh-keygen -q -t rsa1 -f /etc/ssh_host_key -N ''; then
1.114 deraadt 380: echo done.
381: else
382: echo failed.
383: fi
384: fi
385:
1.1 deraadt 386: echo -n starting network daemons:
387:
1.52 deraadt 388: # $gated and $routed_flags are imported from /etc/rc.conf.
1.1 deraadt 389: # If $gated == YES, gated is used; otherwise routed.
390: # If $routed_flags == NO, routed isn't run.
1.67 millert 391: if [ X${gated} = X"YES" -a -e /etc/gated.conf ]; then
1.151 brad 392: echo -n ' gated'; /usr/local/sbin/gated $gated_flags
1.1 deraadt 393: elif [ "X${routed_flags}" != X"NO" ]; then
394: echo -n ' routed'; routed $routed_flags
395: fi
396:
1.52 deraadt 397: # $mrouted_flags is imported from /etc/rc.conf;
1.4 deraadt 398: # If $mrouted_flags == NO, then mrouted isn't run.
399: if [ "X${mrouted_flags}" != X"NO" ]; then
400: echo -n ' mrouted'; mrouted $mrouted_flags
401: fi
1.1 deraadt 402:
1.86 form 403: # $dhcpd_flags is imported from /etc/rc.conf
404: # If $dhcpd_flags == NO or /etc/dhcpd.conf doesn't exist, then dhcpd isn't run.
405: if [ "X${dhcpd_flags}" != X"NO" -a -f /etc/dhcpd.conf ]; then
406: touch /var/db/dhcpd.leases
407: if [ -f /etc/dhcpd.interfaces ]; then
1.141 deraadt 408: dhcpd_ifs=`awk -F\# '{ print $1; }' < /etc/dhcpd.interfaces`
1.86 form 409: fi
410: echo -n ' dhcpd'; /usr/sbin/dhcpd ${dhcpd_flags} ${dhcpd_ifs}
1.127 itojun 411: fi
412:
413: if ifconfig lo0 inet6 >/dev/null 2>&1; then
414: fw=`sysctl -n net.inet6.ip6.forwarding`
415: if [ "X${fw}" == X"0" ]; then
416: # $rtsold_flags is imported from /etc/rc.conf;
417: # If $rtsold_flags == NO, then rtsold isn't run.
418: if [ "X${rtsold_flags}" != X"NO" ]; then
419: echo -n ' rtsold'
420: /usr/sbin/rtsold ${rtsold_flags}
421: fi
422: else
423: # $route6d_flags is imported from /etc/rc.conf;
424: # If $route6d_flags == NO, then route6d isn't run.
425: if [ "X${route6d_flags}" != X"NO" ]; then
426: echo -n ' route6d'
427: /usr/sbin/route6d ${route6d_flags}
428: fi
429: # $rtadvd_flags is imported from /etc/rc.conf;
1.147 itojun 430: # If $rtadvd_flags == NO, then rtadvd isn't run.
431: if [ "X${rtadvd_flags}" != X"NO" ]; then
1.127 itojun 432: echo -n ' rtadvd'
433: /usr/sbin/rtadvd ${rtadvd_flags}
434: fi
435: fi
1.86 form 436: fi
437:
1.52 deraadt 438: # $rwhod is imported from /etc/rc.conf;
1.1 deraadt 439: # if $rwhod == YES, rwhod is run.
440: if [ X${rwhod} = X"YES" ]; then
441: echo -n ' rwhod'; rwhod
442: fi
443:
1.23 deraadt 444:
445: if [ X${lpd} = X"YES" ]; then
446: echo -n ' printer'; lpd
447: fi
1.1 deraadt 448:
1.52 deraadt 449: # $sendmail_flags is imported from /etc/rc.conf;
1.154 millert 450: # If $sendmail_flags == NO or /etc/mailer.conf doesn't exist, then
1.6 deraadt 451: # sendmail isn't run. We call sendmail with a full path so that
1.154 millert 452: # SIGHUP works. Note that /usr/sbin/sendmail may actually call a
453: # mailer other than sendmail, depending on /etc/mailer.conf.
454: if [ "X${sendmail_flags}" != X"NO" -a -s /etc/mailer.conf ]; then
1.153 millert 455: echo -n ' sendmail'; ( /usr/sbin/sendmail ${sendmail_flags} >/dev/null 2>&1 & )
1.69 deraadt 456: fi
457:
458: if [ "X${httpd_flags}" != X"NO" ]; then
1.143 espie 459: # Clean up left-over httpd locks
460: rm -f /var/www/logs/{ssl_mutex,httpd.lock,accept.lock}.*
1.160 angelos 461: echo -n ' httpd'; /usr/sbin/httpd ${httpd_flags}
1.93 downsj 462: fi
463:
464: if [ "X${ftpd_flags}" != X"NO" ]; then
465: echo -n ' ftpd'; /usr/libexec/ftpd ${ftpd_flags}
1.124 fgsch 466: fi
467:
468: if [ "X${identd_flags}" != X"NO" ]; then
469: echo -n ' identd'; /usr/libexec/identd ${identd_flags}
1.1 deraadt 470: fi
1.63 beck 471:
472: # $smtpfwdd_flags is imported from /etc/rc.conf;
473: # If $smtpfwdd_flags == NO, smtpfwdd isn't run.
474: if [ "X${smtpfwdd_flags}" != X"NO" ]; then
475: echo -n ' smtpfwdd'; /usr/libexec/smtpfwdd ${smtpfwdd_flags}
476: fi
477:
1.1 deraadt 478:
1.161 angelos 479: if [ X${inetd} = X"YES" -a -e /etc/inetd.conf ]; then
1.23 deraadt 480: echo -n ' inetd'; inetd
481: fi
1.1 deraadt 482:
1.52 deraadt 483: # $rarpd_flags is imported from /etc/rc.conf;
1.1 deraadt 484: # If $rarpd_flags == NO or /etc/ethers doesn't exist, then
485: # rarpd isn't run.
1.67 millert 486: if [ "X${rarpd_flags}" != X"NO" -a -s /etc/ethers ]; then
1.1 deraadt 487: echo -n ' rarpd'; rarpd ${rarpd_flags}
488: fi
489:
1.52 deraadt 490: # $bootparamd_flags is imported from /etc/rc.conf;
1.1 deraadt 491: # If $bootparamd_flags == NO or /etc/bootparams doesn't exist, then
492: # bootparamd isn't run.
1.67 millert 493: if [ "X${bootparamd_flags}" != X"NO" -a -s /etc/bootparams ]; then
1.1 deraadt 494: echo -n ' rpc.bootparamd'; rpc.bootparamd ${bootparamd_flags}
495: fi
496:
1.52 deraadt 497: # $rbootd_flags is imported from /etc/rc.conf;
1.1 deraadt 498: # If $rbootd_flags == NO or /etc/rbootd.conf doesn't exist, then
499: # rbootd isn't run.
1.67 millert 500: if [ "X${rbootd_flags}" != X"NO" -a -s /etc/rbootd.conf ]; then
1.1 deraadt 501: echo -n ' rbootd'; rbootd ${rbootd_flags}
1.56 maja 502: fi
503:
504: # $mopd_flags is imported from /etc/rc.conf;
505: # If $mopd_flags == NO or /tftpboot/mop doesn't exist, then
506: # mopd isn't run.
507: if [ "X${mopd_flags}" != X"NO" -a -d /tftpboot/mop ]; then
508: echo -n ' mopd'; mopd ${mopd_flags}
1.114 deraadt 509: fi
510:
1.122 deraadt 511: if [ X"${sshd}" == X"YES" ]; then
1.150 deraadt 512: /usr/sbin/sshd; echo -n ' sshd'
1.1 deraadt 513: fi
514:
515: echo '.'
516:
1.12 deraadt 517: if [ -f /sbin/kbd -a -f /etc/kbdtype ]; then
518: kbd `cat /etc/kbdtype`
1.53 deraadt 519: fi
1.17 deraadt 520:
1.66 art 521: # Kerberos runs ONLY on the Kerberos servers
1.156 mickey 522: # Kadmin runs only on the main server
1.17 deraadt 523: if [ X${kerberos_server} = X"YES" ]; then
1.30 tholo 524: echo 'kerberos server'
1.60 art 525: /usr/libexec/kerberos >> /var/log/kerberos.log &
526: /usr/libexec/kadmind -n >> /var/log/kadmind.log &
1.66 art 527: fi
528:
529: # Kpropd runs only on Kerberos slave servers
530: if [ X${kerberos_slave} = X"YES" ]; then
531: echo 'kerberos slave server'
532: /usr/libexec/kerberos -s >> /var/log/kerberos.log &
1.138 hin 533: /usr/libexec/kpropd -i &
1.17 deraadt 534: fi
535:
1.72 deraadt 536: [ -f /etc/rc.local ] && . /etc/rc.local
1.73 millert 537:
538: echo -n standard daemons:
1.87 marc 539:
540: # $apmd_flags is imported from /etc/rc.conf;
541: # don't run daemon if $apmd_flags == NO or /usr/sbin/apmd doesn't exist
542: if [ "X${apmd_flags}" != X"NO" -a -x /usr/sbin/apmd ]; then
543: echo -n ' apmd'; /usr/sbin/apmd ${apmd_flags}
1.116 deraadt 544: fi
545:
546: if [ -x /usr/sbin/screenblank ]; then
547: echo -n ' screenblank'; /usr/sbin/screenblank
1.87 marc 548: fi
549:
1.73 millert 550: echo -n ' cron'; cron
1.87 marc 551:
1.73 millert 552: echo '.'
1.162 mickey 553:
554: if [ -f /etc/rc.wscons -a -f /etc/wscons.conf ]; then
555: echo configuring wscons
556: /bin/sh /etc/rc.wscons
557: fi
1.1 deraadt 558:
559: date
1.71 deraadt 560:
1.155 aaron 561: if [ "X${moused_flags}" != X"NO" -a -x /usr/sbin/moused ]; then
562: echo 'starting moused...'; /usr/sbin/moused ${moused_flags}
563: fi
564:
1.71 deraadt 565: # Alternatively, on some architectures, xdm may be started in /etc/ttys.
566: if [ "X${xdm_flags}" != X"NO" ]; then
1.92 downsj 567: echo 'starting xdm...'; /usr/X11R6/bin/xdm ${xdm_flags}
1.71 deraadt 568: fi
569:
1.1 deraadt 570: exit 0
1.90 art 571: