[BACK]Return to rc CVS log [TXT][DIR] Up to [local] / src / etc

Annotation of src/etc/rc, Revision 1.122

1.122   ! deraadt     1: #      $OpenBSD: rc,v 1.121 1999/10/11 20:09:53 millert 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:
                    108: # set hostname, turn on network
                    109: echo 'starting network'
                    110: . /etc/netstart
                    111:
                    112: mount /usr >/dev/null 2>&1
                    113: mount /var >/dev/null 2>&1
1.29      deraadt   114:
1.55      deraadt   115: # clean up left-over files
                    116: rm -f /etc/nologin
                    117: rm -f /var/spool/lock/LCK.*
                    118: rm -f /var/spool/uucp/STST/*
                    119: (cd /var/run && { rm -rf -- *; install -c -m 664 -g utmp /dev/null utmp; })
1.96      alex      120:
                    121: # save a copy of the boot messages
                    122: dmesg >/var/run/dmesg.boot
1.55      deraadt   123:
1.58      deraadt   124: echo 'starting system logger'
                    125: rm -f /dev/log
1.76      millert   126: if [ "X${named_flags}" != X"NO" -a "X${named_chroot}" != "X" ]; then
1.74      millert   127:        rm -f ${named_chroot}/dev/log
                    128:        syslogd_flags="${syslogd_flags} -a ${named_chroot}/dev/log"
                    129: fi
1.65      marc      130: syslogd ${syslogd_flags}
1.58      deraadt   131:
1.89      todd      132: # /etc/ifaliases, if it exists, contains the names of additional IP
                    133: # addresses for each interface. It is formatted as a series of lines
                    134: # that contain
                    135: #      interface address netmask
                    136: if [ -f /etc/ifaliases ]; then
                    137: (
                    138:        # delete comments and blank lines
                    139:        set -- `sed -e 's/#.*$//' /etc/ifaliases | grep -v '^$'`
                    140:        while [ $# -ge 3 ] ; do
                    141:                ifconfig $1 inet alias $2 netmask $3
                    142:                route -n add -host $2 localhost
                    143:                shift 3
                    144:        done
                    145: )
                    146: fi
                    147:
1.74      millert   148: # $named_flags, $named_user, and $named_chroot are imported from /etc/rc.conf;
1.54      deraadt   149: # if $named_flags != NO, named is run.
                    150: if [ "X${named_flags}" != X"NO" ]; then
1.74      millert   151:        if [ "X${named_user}" != "X" -a "X${named_user}" != X"root" ]; then
                    152:                named_flags="-u ${named_user} ${named_flags}"
                    153:        fi
1.75      millert   154:        if [ "X${named_chroot}" != "X" ]; then
1.81      millert   155:                if [ ! -c "${named_chroot}/dev/null" ]; then
                    156:                        ( cd /dev ; pax -rw -pe null ${named_chroot}/dev )
1.83      millert   157:                fi
                    158:                if [ -f /etc/localtime -a -d "${named_chroot}/etc" ]; then
                    159:                        cmp -s /etc/localtime "${named_chroot}/etc/localtime" \
                    160:                        || cp -p /etc/localtime "${named_chroot}/etc/localtime"
1.81      millert   161:                fi
1.74      millert   162:                named_flags="-t ${named_chroot} ${named_flags}"
                    163:        fi
1.58      deraadt   164:        echo 'starting named';          named $named_flags
1.29      deraadt   165: fi
1.1       deraadt   166:
1.5       dm        167: if [ X"${ipfilter}" = X"YES" -a X"${ipmon_flags}" != X"NO" ]; then
1.43      mickey    168:        echo 'starting ipmon';          ipmon ${ipmon_flags}
1.25      deraadt   169: fi
                    170:
1.52      deraadt   171: # $photurisd_flags is imported from /etc/rc.conf;
1.45      kstailey  172: # If $photurisd_flags == NO or /etc/photuris/photuris.conf doesn't exist, then
1.40      provos    173: # photurisd isn't run.
1.45      kstailey  174: if [ "X${photurisd_flags}" != X"NO" -a -e /etc/photuris/photuris.conf ]; then
1.40      provos    175:        echo 'starting photurisd';      photurisd ${photurisd_flags}
1.94      deraadt   176: fi
                    177:
                    178: # $isakmpd_flags is imported from /etc/rc.conf;
                    179: # If $isakmpd_flags == NO or /etc/isakmpd.conf doesn't exist, then
                    180: # isakmpd isn't run.
                    181: if [ "X${isakmpd_flags}" != X"NO" -a -e /etc/isakmpd.conf ]; then
                    182:        echo 'starting isakmpd';        isakmpd ${isakmpd_flags}
1.40      provos    183: fi
1.1       deraadt   184:
                    185: echo -n 'starting rpc daemons:'
1.24      millert   186:
1.52      deraadt   187: # $portmap is imported from /etc/rc.conf;
1.24      millert   188: # if $portmap == YES, the portmapper is started.
                    189: if [ X"${portmap}" = X"YES" ]; then
1.23      deraadt   190:        echo -n ' portmap';             portmap
                    191: fi
1.1       deraadt   192:
1.9       deraadt   193: if [ -d /var/yp/binding ]; then
1.8       deraadt   194:        if [ -d /var/yp/`domainname` ]; then
                    195:                # yp server capabilities needed...
1.36      niklas    196:                echo -n ' ypserv';              ypserv ${ypserv_flags}
1.16      deraadt   197:                #echo -n ' ypxfrd';             ypxfrd
1.21      deraadt   198:        fi
                    199:
                    200:        echo -n ' ypbind';              ypbind
1.8       deraadt   201:
1.21      deraadt   202:        if [ -d /var/yp/`domainname` ]; then
1.8       deraadt   203:                # if we are the master server, run rpc.yppasswdd
                    204:                _host1=`ypwhich -m passwd 2> /dev/null`
                    205:                _host2=`hostname`
1.15      deraadt   206:                if [ `grep '^lookup' /etc/resolv.conf | grep yp | wc -c` -ne 0 ]; then
1.8       deraadt   207:                        _host1=`ypmatch $_host1 hosts | cut -d' ' -f2`
                    208:                        _host2=`ypmatch $_host2 hosts | cut -d' ' -f2 | head -1`
                    209:                else
                    210:                        _host1=`nslookup $_host1 | grep '^Name: ' | \
                    211:                            sed -e 's/^Name:    //'`
                    212:                        _host2=`nslookup $_host2 | grep '^Name: ' | \
                    213:                            sed -e 's/^Name:    //'`
                    214:                fi
1.13      deraadt   215:                if [ "$_host2" = "$_host1" ]; then
1.35      niklas    216:                        echo -n ' rpc.yppasswdd'
                    217:                        rpc.yppasswdd ${yppasswdd_flags}
1.8       deraadt   218:                fi
1.7       deraadt   219:        fi
1.1       deraadt   220: fi
                    221:
1.52      deraadt   222: # $nfs_server is imported from /etc/rc.conf;
1.1       deraadt   223: # if $nfs_server == YES, the machine is setup for being an nfs server
1.67      millert   224: if [ X${nfs_server} = X"YES" -a -s /etc/exports -a \
1.47      deraadt   225:     `cat /etc/exports | sed -e '/^#/d' | wc -l` -ne 0 ]; then
1.68      millert   226:        rm -f /var/db/mountdtab
1.1       deraadt   227:        echo -n > /var/db/mountdtab
                    228:        echo -n ' mountd';              mountd
1.42      niklas    229:        echo -n ' nfsd';                nfsd ${nfsd_flags}
                    230:        if [ X${lockd} = X"YES" ]; then
                    231:                echo -n ' rpc.lockd';   rpc.lockd
                    232:        fi
1.1       deraadt   233: fi
                    234:
1.52      deraadt   235: # $nfs_client is imported from /etc/rc.conf;
1.1       deraadt   236: # if $nfs_client == YES, the machine is setup for being an nfs client
                    237: if [ X${nfs_client} = X"YES" ]; then
1.59      downsj    238:        echo -n ' nfsiod';              nfsiod ${nfsiod_flags}
1.1       deraadt   239: fi
                    240:
1.67      millert   241: if [ X${amd} = X"YES" -a -d ${amd_dir} -a -e ${amd_master} ]; then
1.1       deraadt   242:        echo -n ' amd'
1.107     deraadt   243:        (cd /etc/amd; amd -l syslog -x error,noinfo,nostats -p \
                    244:            -a ${amd_dir} `cat ${amd_master}` > /var/run/amd.pid )
1.1       deraadt   245: fi
                    246:
1.52      deraadt   247: # $timed_flags is imported from /etc/rc.conf;
1.1       deraadt   248: # if $timed_flags == NO, timed isn't run.
                    249: if [ "X${timed_flags}" != X"NO" ]; then
1.58      deraadt   250:        echo -n ' timed'; timed $timed_flags
1.1       deraadt   251: fi
                    252: echo '.'
1.58      deraadt   253:
                    254: mount -a -t nfs
1.1       deraadt   255:
                    256: # /var/crash should be a directory or a symbolic link
                    257: # to the crash directory if core dumps are to be saved.
                    258: if [ -d /var/crash ]; then
                    259:        savecore /var/crash
                    260: fi
                    261:
1.90      art       262: if [ "X${afs}" = X"YES" -a -c ${afs_device} -a -d ${afs_mount_point} ]; then
                    263:        echo -n 'mounting afs:'
1.91      art       264:        mount -t xfs ${afs_device} ${afs_mount_point}
1.90      art       265:        /usr/libexec/afsd ${afsd_flags} -d ${afs_device}
                    266:        echo ' done.'
                    267: fi
                    268:
1.41      downsj    269: if [ "X${check_quotas}" = X"YES" ]; then
                    270:        echo -n 'checking quotas:'
                    271:        quotacheck -a
                    272:        echo ' done.'
                    273:        quotaon -a
                    274: fi
1.1       deraadt   275:
                    276: # build ps databases
1.95      deraadt   277: echo -n 'building ps databases:'
                    278: echo -n " kvm"
1.88      millert   279: kvm_mkdb
1.95      deraadt   280: echo -n " dev"
1.1       deraadt   281: dev_mkdb
1.95      deraadt   282: echo "."
1.1       deraadt   283:
1.101     deraadt   284: chmod 666 /dev/tty[pqrstuvwxyzPQRST]*
                    285: chown root.wheel /dev/tty[pqrstuvwxyzPQRST]*
1.1       deraadt   286:
                    287: # check the password temp/lock file
1.17      deraadt   288: if [ -f /etc/ptmp ]; then
1.1       deraadt   289:        logger -s -p auth.err \
                    290:        'password file may be incorrect -- /etc/ptmp exists'
1.32      deraadt   291: fi
                    292:
1.49      millert   293: echo clearing /tmp
                    294:
                    295: # prune quickly with one rm, then use find to clean up /tmp/[lq]*
                    296: # (not needed with mfs /tmp, but doesn't hurt there...)
                    297: (cd /tmp && rm -rf [a-km-pr-zA-Z]* &&
                    298:     find . ! -name . ! -name lost+found ! -name quota.user \
1.103     millert   299:        ! -name quota.group -execdir rm -rf -- {} \; -type d -prune)
1.61      deraadt   300:
                    301: if [ -f /etc/sysctl.conf ]; then
1.62      deraadt   302: (
1.61      deraadt   303:        # delete comments and blank lines
                    304:        set -- `sed -e 's/#.*$//' /etc/sysctl.conf | grep -v '^$'`
                    305:        while [ $# -ge 1 ] ; do
                    306:                sysctl -w $1
                    307:                shift 1
                    308:        done
1.68      millert   309: )
1.61      deraadt   310: fi
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}
                    385: fi
                    386:
1.52      deraadt   387: # $rwhod is imported from /etc/rc.conf;
1.1       deraadt   388: # if $rwhod == YES, rwhod is run.
                    389: if [ X${rwhod} = X"YES" ]; then
                    390:        echo -n ' rwhod';               rwhod
                    391: fi
                    392:
1.23      deraadt   393:
                    394: if [ X${lpd} = X"YES" ]; then
                    395:        echo -n ' printer';             lpd
                    396: fi
1.1       deraadt   397:
1.52      deraadt   398: # $sendmail_flags is imported from /etc/rc.conf;
1.1       deraadt   399: # If $sendmail_flags == NO or /etc/sendmail.cf doesn't exist, then
1.6       deraadt   400: # sendmail isn't run.  We call sendmail with a full path so that
                    401: # SIGHUP works.
1.67      millert   402: if [ "X${sendmail_flags}" != X"NO" -a -s /etc/sendmail.cf ]; then
1.6       deraadt   403:        echo -n ' sendmail';            /usr/sbin/sendmail ${sendmail_flags}
1.69      deraadt   404: fi
                    405:
                    406: if [ "X${httpd_flags}" != X"NO"  ]; then
                    407:        echo -n ' httpd';               /usr/sbin/httpd ${httpd_flags}
1.93      downsj    408: fi
                    409:
                    410: if [ "X${ftpd_flags}" != X"NO" ]; then
                    411:        echo -n ' ftpd';                /usr/libexec/ftpd ${ftpd_flags}
1.1       deraadt   412: fi
1.63      beck      413:
                    414: # $smtpfwdd_flags is imported from /etc/rc.conf;
                    415: # If $smtpfwdd_flags == NO, smtpfwdd isn't run.
                    416: if [ "X${smtpfwdd_flags}" != X"NO" ]; then
                    417:        echo -n ' smtpfwdd';    /usr/libexec/smtpfwdd ${smtpfwdd_flags}
                    418: fi
                    419:
1.1       deraadt   420:
1.23      deraadt   421: if [ X${inetd} = X"YES" ]; then
                    422:        echo -n ' inetd';               inetd
                    423: fi
1.1       deraadt   424:
1.52      deraadt   425: # $rarpd_flags is imported from /etc/rc.conf;
1.1       deraadt   426: # If $rarpd_flags == NO or /etc/ethers doesn't exist, then
                    427: # rarpd isn't run.
1.67      millert   428: if [ "X${rarpd_flags}" != X"NO" -a -s /etc/ethers ]; then
1.1       deraadt   429:        echo -n ' rarpd';               rarpd ${rarpd_flags}
                    430: fi
                    431:
1.52      deraadt   432: # $bootparamd_flags is imported from /etc/rc.conf;
1.1       deraadt   433: # If $bootparamd_flags == NO or /etc/bootparams doesn't exist, then
                    434: # bootparamd isn't run.
1.67      millert   435: if [ "X${bootparamd_flags}" != X"NO" -a -s /etc/bootparams ]; then
1.1       deraadt   436:        echo -n ' rpc.bootparamd';      rpc.bootparamd ${bootparamd_flags}
                    437: fi
                    438:
1.52      deraadt   439: # $rbootd_flags is imported from /etc/rc.conf;
1.1       deraadt   440: # If $rbootd_flags == NO or /etc/rbootd.conf doesn't exist, then
                    441: # rbootd isn't run.
1.67      millert   442: if [ "X${rbootd_flags}" != X"NO" -a -s /etc/rbootd.conf ]; then
1.1       deraadt   443:        echo -n ' rbootd';              rbootd ${rbootd_flags}
1.56      maja      444: fi
                    445:
                    446: # $mopd_flags is imported from /etc/rc.conf;
                    447: # If $mopd_flags == NO or /tftpboot/mop doesn't exist, then
                    448: # mopd isn't run.
                    449: if [ "X${mopd_flags}" != X"NO" -a -d /tftpboot/mop ]; then
                    450:        echo -n ' mopd';                mopd ${mopd_flags}
1.114     deraadt   451: fi
                    452:
1.122   ! deraadt   453: if [ X"${sshd}" == X"YES" ]; then
        !           454:        if [ -x /usr/sbin/sshd ]; then
        !           455:                if /usr/sbin/sshd -Q ; then
        !           456:                        echo -n ' sshd';
        !           457:                        #echo -n ' sshd(2022)'; /usr/sbin/sshd -p 2022
        !           458:                fi
        !           459:        elif [ -x /usr/local/sbin/sshd ]; then
1.119     deraadt   460:                /usr/local/sbin/sshd
                    461:                echo -n ' sshd';
1.122   ! deraadt   462:                #echo -n ' sshd(2022)'; /usr/local/sbin/sshd -p 2022
1.119     deraadt   463:        fi
1.1       deraadt   464: fi
                    465:
                    466: echo '.'
                    467:
1.12      deraadt   468: if [ -f /sbin/kbd -a -f /etc/kbdtype ]; then
                    469:        kbd `cat /etc/kbdtype`
1.53      deraadt   470: fi
1.17      deraadt   471:
1.66      art       472: # Kerberos runs ONLY on the Kerberos servers
                    473: # Kadmin is runs only on the main server
1.17      deraadt   474: if [ X${kerberos_server} = X"YES" ]; then
1.30      tholo     475:        echo 'kerberos server'
1.60      art       476:        /usr/libexec/kerberos >> /var/log/kerberos.log &
                    477:        /usr/libexec/kadmind -n >> /var/log/kadmind.log &
1.66      art       478: fi
                    479:
                    480: # Kpropd runs only on Kerberos slave servers
                    481: if [ X${kerberos_slave} = X"YES" ]; then
                    482:        echo 'kerberos slave server'
                    483:        /usr/libexec/kerberos -s >> /var/log/kerberos.log &
                    484:        /usr/libexec/kpropd -i &
1.17      deraadt   485: fi
                    486:
1.72      deraadt   487: [ -f /etc/rc.local ] && . /etc/rc.local
1.73      millert   488:
                    489: echo -n standard daemons:
1.87      marc      490:
                    491: # $apmd_flags is imported from /etc/rc.conf;
                    492: # don't run daemon if $apmd_flags == NO or /usr/sbin/apmd doesn't exist
                    493: if [ "X${apmd_flags}" != X"NO" -a -x /usr/sbin/apmd ]; then
                    494:         echo -n ' apmd';        /usr/sbin/apmd ${apmd_flags}
1.116     deraadt   495: fi
                    496:
                    497: if [ -x /usr/sbin/screenblank ]; then
                    498:        echo -n ' screenblank'; /usr/sbin/screenblank
1.87      marc      499: fi
                    500:
1.73      millert   501: echo -n ' cron';               cron
1.87      marc      502:
1.73      millert   503: echo '.'
1.1       deraadt   504:
                    505: date
1.71      deraadt   506:
                    507: # Alternatively, on some architectures, xdm may be started in /etc/ttys.
                    508: if [ "X${xdm_flags}" != X"NO" ]; then
1.92      downsj    509:        echo 'starting xdm...';         /usr/X11R6/bin/xdm ${xdm_flags}
1.71      deraadt   510: fi
                    511:
1.1       deraadt   512: exit 0
1.90      art       513: