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