[BACK]Return to rc CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / etc

Annotation of src/etc/rc, Revision 1.138

1.138   ! hubertf     1: #      $NetBSD: rc,v 1.137 1999/11/23 08:05:04 lukem Exp $
1.73      perry       2: #      originally from: @(#)rc 8.2 (Berkeley) 3/17/94
1.1       cgd         3:
                      4: # System startup script run by init on autoboot
                      5: # or after single-user.
                      6: # Output and error are redirected to console by init,
                      7: # and the console is the controlling terminal.
                      8:
                      9: stty status '^T'
                     10:
                     11: # Set shell to ignore SIGINT (2), but not children;
                     12: # shell catches SIGQUIT (3) and returns to single user after fsck.
                     13: trap : 2
                     14: trap : 3       # shouldn't be needed
                     15:
1.68      mycroft    16: export HOME=/
1.96      jonathan   17: export PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin
1.50      thorpej    18:
                     19: # Configure ccd devices.
1.63      mrg        20: if [ -f /etc/ccd.conf ]; then
1.50      thorpej    21:        ccdconfig -C
                     22: fi
1.107     tron       23:
                     24: # Configure raid devices.
                     25: for dev in 0 1 2 3; do
                     26:        if [ -f /etc/raid$dev.conf ]; then
                     27:                raidctl -c /etc/raid$dev.conf raid$dev
                     28:        fi
                     29: done
1.1       cgd        30:
1.79      thorpej    31: # Add all block-type swap devices; these might be necessary
                     32: # during disk checks.
                     33: swapctl -A -t blk
                     34:
1.63      mrg        35: if [ -e /fastboot ]; then
1.38      cgd        36:        echo "Fast boot: skipping disk checks."
1.68      mycroft    37: elif [ "$1" = autoboot ]; then
1.38      cgd        38:        echo "Automatic boot in progress: starting file system checks."
1.1       cgd        39:        fsck -p
                     40:        case $? in
                     41:        0)
                     42:                ;;
                     43:        2)
                     44:                exit 1
                     45:                ;;
                     46:        4)
1.35      cgd        47:                echo "Rebooting..."
1.1       cgd        48:                reboot
1.38      cgd        49:                echo "Reboot failed; help!"
1.1       cgd        50:                exit 1
                     51:                ;;
                     52:        8)
1.38      cgd        53:                echo "Automatic file system check failed; help!"
1.1       cgd        54:                exit 1
                     55:                ;;
                     56:        12)
1.38      cgd        57:                echo "Boot interrupted."
1.1       cgd        58:                exit 1
                     59:                ;;
                     60:        130)
                     61:                # interrupt before catcher installed
                     62:                exit 1
                     63:                ;;
                     64:        *)
1.38      cgd        65:                echo "Unknown error; help!"
1.1       cgd        66:                exit 1
                     67:                ;;
                     68:        esac
                     69: fi
                     70:
1.38      cgd        71: trap "echo 'Boot interrupted.'; exit 1" 3
1.1       cgd        72:
                     73: umount -a >/dev/null 2>&1
1.83      drochner   74: mount /
1.1       cgd        75: rm -f /fastboot                # XXX (root now writeable)
1.40      cgd        76:
1.90      veego      77: if [ -f /etc/rc.subr ]; then
                     78:        . /etc/rc.subr
1.89      cjs        79: else
1.90      veego      80:        echo "Can't read /etc/rc.subr; aborting."
1.89      cjs        81:        exit 1;
                     82: fi
                     83:
1.71      mycroft    84: if [ -f /etc/rc.conf ]; then
1.63      mrg        85:        . /etc/rc.conf
                     86: fi
                     87:
1.135     frueauf    88: if ! checkyesno rc_configured; then
1.89      cjs        89:        echo "/etc/rc.conf is not configured. Multiuser boot aborted."
                     90:        exit 1
                     91: fi
                     92:
1.40      cgd        93: # set flags on ttys.  (do early, in case they use tty for SLIP in netstart)
                     94: echo 'setting tty flags'
                     95: ttyflags -a
1.1       cgd        96:
1.83      drochner   97: # load kernel modules specified in /etc/lkm.conf if the /usr filesystem
                     98: # is already present with "/" or can be mounted now
1.93      drochner   99: if checkyesno lkm && [ -f /etc/rc.lkm ]; then
1.83      drochner  100:        mount /usr >/dev/null 2>&1
                    101:        if [ -x /usr/bin/ld ]; then
                    102:                lkmstage=BEFORENET
                    103:                . /etc/rc.lkm
                    104:        fi
1.63      mrg       105: fi
                    106:
1.124     cjs       107: mount_critical_filesystems local
1.120     mellon    108:
1.133     darrenr   109: if [ -e /etc/etc.current ] ; then
                    110:        if [ -h /etc/etc.default ] ; then
                    111:                def=`ls -ld /etc/etc.default 2>&1`
                    112:                default=`expr "$def" : '.*-> etc\.\(.*\)' 2>&1`
                    113:        else
                    114:                default=current
                    115:        fi
                    116:        spc=""
                    117:        conflist=`cd /etc; ls -1d etc.* 2>&1 | egrep -v 'current|default'`
                    118:        for i in $conflist; do
                    119:                name=`expr $i : 'etc\.\(.*\)' 2>&1`
                    120:                if [ $name = $default ] ; then
                    121:                        echo -n "${spc}[${name}]"
                    122:                else
                    123:                        echo -n "${spc}${name}"
                    124:                fi
                    125:                spc=" "
                    126:        done
                    127:        echo
                    128:        master=$$
                    129:        conf=/etc/passwd
                    130:        while [ ! -d /etc/etc.$conf ] ; do
                    131:                trap 'conf=$default; echo; echo Using default of $conf' 14
                    132:                echo -n "Which configuration [$default] ? "
                    133:                (sleep 30 && kill -ALRM $master) >/dev/null 2>&1 &
                    134:                read conf
                    135:                trap "" 14
                    136:                if [ -z $conf ] ; then
                    137:                        conf=$default
                    138:                fi
                    139:                if [ ! -d /etc/etc.$conf -a ! -h /etc/etc.$conf ] ; then
                    140:                        conf=/etc/passwd
                    141:                fi
                    142:        done
                    143:        rm -f /etc/etc.current
                    144:        ln -s /etc/etc.$conf /etc/etc.current
                    145:        if [ -f /etc/rc.conf ] ; then
                    146:                . /etc/rc.conf
                    147:        fi
                    148: fi
                    149:
1.1       cgd       150: # set hostname, turn on network
                    151: echo 'starting network'
1.76      scottr    152: sh /etc/netstart
                    153: if [ $? -ne 0 ]; then
                    154:        exit 1
                    155: fi
1.1       cgd       156:
1.124     cjs       157: mount_critical_filesystems network
1.99      veego     158:
                    159: # Network Address Translation...
1.100     lukem     160: if checkyesno ipnat && [ -f /etc/ipnat.conf ]; then
1.99      veego     161:        echo 'installing NAT rules ... '
1.100     lukem     162:        if ! checkyesno ipfilter || [ ! -f /etc/ipf.conf ]; then
1.99      veego     163:                ipf -E -Fa
                    164:        fi
                    165:        ipnat -F -f /etc/ipnat.conf
                    166: fi
1.79      thorpej   167:
                    168: # "Critical" file systems are now mounted.  Go ahead and swap
                    169: # to files now, since they will be residing in the critical file
                    170: # systems (or, at least, better).
                    171: swapctl -A -t noblk
1.97      mrg       172:
                    173: # Check for no swap, and warn about it unless that is desired.
1.100     lukem     174: if ! checkyesno no_swap; then
1.97      mrg       175:        swapctl -s | grep 'no swap devices configured' > /dev/null && \
                    176:                echo "WARNING:  no swap space configured!"
                    177: fi
1.26      deraadt   178:
1.41      jtc       179: # clean up left-over files
                    180: rm -f /etc/nologin
                    181: rm -f /var/spool/lock/LCK.*
                    182: rm -f /var/spool/uucp/STST/*
1.45      cgd       183: (cd /var/run && { rm -rf -- *; install -c -m 664 -g utmp /dev/null utmp; })
1.108     abs       184:
1.134     darrenr   185: # build ps databases
                    186: echo 'building databases...'
1.131     darrenr   187: # if this kernel supports machdep.booted_kernel, use that to build the KVM
                    188: # db so dmesg will run work when we boot /netbsd.new, etc.
1.133     darrenr   189: sysctl machdep 2>/dev/null | grep -q booted_kernel
1.131     darrenr   190: if [ $? -eq 0 ] ; then
                    191:         kvm_mkdb `sysctl -n machdep.booted_kernel`
1.134     darrenr   192:        if [ $? -ne 0 ] ; then
                    193:                kvm_mkdb /netbsd
                    194:        fi
                    195: else
                    196:        kvm_mkdb /netbsd
1.131     darrenr   197: fi
1.134     darrenr   198: dev_mkdb
                    199:
1.111     mrg       200: # get the system dmesg output, hopefully containing the boot messages
                    201: # $dmesg_flags is imported from /etc/rc.conf
                    202: if checkyesno dmesg; then
                    203:        dmesg $dmesg_flags > /var/run/dmesg.boot
                    204: fi
1.41      jtc       205:
1.125     tron      206: if checkyesno wscons && [ -f /etc/rc.wscons ]; then
                    207:        echo 'configuring wscons'
                    208:        /bin/sh /etc/rc.wscons $wscons_flags
                    209: fi
                    210:
1.84      veego     211: # start the system logger first, so that all messages from daemons
                    212: # are logged, then start savecore to get a dump on low memory systems
                    213: # and then start the name server.
1.63      mrg       214:
1.89      cjs       215: if checkyesno syslogd; then
1.63      mrg       216:        echo 'starting system logger'
1.119     perry     217:        # Transitional symlink for old binaries
                    218:        if [ ! -h /dev/log ] ; then
                    219:                ln -sf /var/run/log /dev/log
                    220:        fi
                    221:        rm -f /var/run/log
1.63      mrg       222:        syslogd $syslogd_flags
1.94      lukem     223: fi
                    224:
                    225: # Enable ipmon (only useful if ipfilter is running)
                    226: # NOTE: requires the IPFILTER_LOG kernel option.
                    227: if checkyesno ipmon; then
                    228:        echo 'starting ipmon'
                    229:        ipmon $ipmon_flags &
1.63      mrg       230: fi
                    231:
1.84      veego     232: # /var/crash should be a directory or a symbolic link
                    233: # to the crash directory if core dumps are to be saved.
1.89      cjs       234: if checkyesno savecore; then
1.106     hubertf   235:        if [ -d /var/crash/. ]; then
1.89      cjs       236:                echo checking for core dump...
                    237:                savecore $savecore_flags /var/crash
                    238:        else
                    239:                logger -s "WARNING: no /var/crash directory; savecore not run."
1.84      veego     240:        fi
                    241: fi
                    242:
1.89      cjs       243: if checkyesno named; then
                    244:        echo 'starting name server';    named $named_flags
                    245: fi
                    246:
                    247: # set time, if requested
                    248: if checkyesno ntpdate; then
1.91      mikel     249:        if [ -z "$ntpdate_hosts" ]; then
1.101     lukem     250:                ntpdate_hosts=`awk '
                    251:                    /^server[ \t]*127.127/      {next}
1.115     bad       252:                    /^(server|peer)/                    {print $2}
1.101     lukem     253:                ' </etc/ntp.conf`
1.89      cjs       254:        fi
                    255:        if [ -n "$ntpdate_hosts"  ]; then
                    256:                echo 'Setting date via ntp.'
1.102     lukem     257:                ntpdate -b -s $ntpdate_hosts
1.67      mycroft   258:        fi
1.63      mrg       259: fi
                    260:
1.84      veego     261: # now start the rpc servers, for YP server/client.
1.63      mrg       262: echo -n 'starting rpc daemons:'
                    263:
                    264: # note that portmap is generally required for all other rpc services.
1.89      cjs       265: if checkyesno portmap; then
1.109     jwise     266:        echo -n ' portmap';             portmap $portmap_flags
1.63      mrg       267: fi
                    268:
1.89      cjs       269: if checkyesno ypserv; then
1.138   ! hubertf   270:        checkyesno portmap || \
        !           271:        logger -s "WARNING: set portmap=YES in /etc/rc.conf if ypserv=YES."
        !           272:
1.63      mrg       273:         echo -n ' ypserv';              ypserv $ypserv_flags
                    274: fi
                    275:
1.89      cjs       276: if checkyesno ypbind; then
1.63      mrg       277:         echo -n ' ypbind';              ypbind $ypbind_flags
                    278: fi
                    279:
1.89      cjs       280: if checkyesno yppasswdd; then
1.138   ! hubertf   281:        checkyesno ypserv || \
        !           282:        logger -s "WARNING: set ypserv=YES in /etc/rc.conf if yppasswdd=YES."
        !           283:
1.63      mrg       284:         echo -n ' rpc.yppasswdd';       rpc.yppasswdd $yppasswdd_flags
                    285: fi
                    286:
1.89      cjs       287: if checkyesno bootparamd; then
                    288:        if [ -r /etc/bootparams ]; then
                    289:                echo -n ' rpc.bootparamd'; rpc.bootparamd $bootparamd_flags
                    290:        else
                    291:                echo
                    292:                logger -s "WARNING: /etc/bootparams not found. " \
                    293:                    "bootparamd not started."
1.67      mycroft   294:        fi
1.63      mrg       295: fi
                    296:
1.84      veego     297: echo '.'
                    298:
                    299: # load kernel modules specified in /etc/lkm.conf
1.89      cjs       300: if checkyesno lkm; then
                    301:        if [ -r /etc/rc.lkm ]; then
                    302:                lkmstage=BEFOREMOUNT
                    303:                . /etc/rc.lkm
                    304:        else
                    305:                logger -s "WARNING: /etc/rc.lkm not found; LKMs not loaded."
                    306:        fi
1.84      veego     307: fi
                    308:
                    309: mount -a
                    310:
                    311: # now start the rpc servers, for NFS server/client.
1.133     darrenr   312: if checkyesno nfs_client || checkyesno nfs_server; then
                    313:        echo -n 'starting nfs daemons:'
1.138   ! hubertf   314:
        !           315:        if checkyesno nfs_server && ! checkyesno portmap; then
        !           316:                logger -s "WARNING: set portmap=YES in /etc/rc.conf if nfs_server=YES."
        !           317:        fi
1.133     darrenr   318:
                    319:        nfs_locking=NO
1.84      veego     320:
1.133     darrenr   321:        if checkyesno nfs_server; then
                    322:                if [ -r /etc/exports ]; then
                    323:                        rm -f /var/db/mountdtab
                    324:                        echo -n > /var/db/mountdtab
                    325:                        echo -n ' mountd';              mountd $mountd_flags
                    326:                        echo -n ' nfsd';                nfsd $nfsd_flags
                    327:                        nfs_locking=YES
                    328:                else
                    329:                        echo
                    330:                        logger -s "WARNING: /etc/exports not readable; " \
                    331:                            "NFS server not started."
                    332:                fi
                    333:        fi
1.67      mycroft   334:
1.133     darrenr   335:        if checkyesno nfs_client; then
                    336:                echo -n ' nfsiod';              nfsiod $nfsiod_flags
1.100     lukem     337:                nfs_locking=YES
1.69      mycroft   338:        fi
1.63      mrg       339:
1.133     darrenr   340:        if checkyesno nfs_locking; then
                    341:                if checkyesno statd; then
                    342:                        echo -n ' rpc.statd';           rpc.statd $statd_flags
                    343:                fi
                    344:                if checkyesno lockd; then
                    345:                        echo -n ' rpc.lockd';           rpc.lockd $lockd_flags
                    346:                fi
1.66      scottr    347:        fi
1.63      mrg       348:
1.133     darrenr   349:        if checkyesno amd; then
                    350:                if [ -d "$amd_dir" ]; then
                    351:                        if [ -r "$amd_master" ]; then
                    352:                                echo -n ' amd'
                    353:                                amd $amd_flags -p -a $amd_dir \
                    354:                                `sed s/#.*$// <$amd_master`  >/var/run/amd.pid
                    355:                        else
                    356:                                echo
                    357:                                logger -s "WARNING: \$amd_master ($amd_master)not " \
                    358:                                    "readable; amd not started."
                    359:                        fi
1.89      cjs       360:                else
                    361:                        echo
1.133     darrenr   362:                        logger -s "WARNING: \$amd_dir ($amd_dir) not a directory; " \
                    363:                            "amd not started."
1.89      cjs       364:                fi
1.67      mycroft   365:        fi
1.133     darrenr   366:        echo '.'
1.63      mrg       367: fi
                    368:
1.83      drochner  369:
1.63      mrg       370: if [ -f /sbin/ldconfig ]; then
                    371:        echo 'creating runtime link editor directory cache.'
1.88      thorpej   372:        ldconfig
1.63      mrg       373: fi
1.83      drochner  374:
                    375: # load kernel modules specified in /etc/lkm.conf
1.89      cjs       376: if checkyesno lkm && [ -f /etc/rc.lkm ]; then
1.83      drochner  377:        lkmstage=AFTERMOUNT
                    378:        . /etc/rc.lkm
1.132     bouyer    379: fi
                    380:
                    381: # if $defcorename is set, change it here.
                    382: if [ -n "$defcorename" ]; then
                    383:        echo -n 'setting default core name template: '
                    384:        sysctl -w kern.defcorename=$defcorename
1.1       cgd       385: fi
                    386:
1.112     mrg       387: # if $securelevel is set, change it here, else if it is 0, change
                    388: # it to 1 here, before we start login services.
1.113     mrg       389: if [ -n "$securelevel" ]; then
1.112     mrg       390:        echo -n 'setting securelevel: '
                    391:        sysctl -w kern.securelevel=$securelevel
                    392: else
1.116     frueauf   393:        securelevel=`sysctl -n kern.securelevel`
1.112     mrg       394:        if [ x"$securelevel" = x0 ]; then
                    395:                echo -n 'setting securelevel: '
                    396:                sysctl -w kern.securelevel=1
                    397:        fi
                    398: fi
                    399:
1.89      cjs       400: echo -n 'checking quotas:'; quotacheck -a; echo ' done.'
1.47      deraadt   401: quotaon -a
1.1       cgd       402:
                    403: chmod 666 /dev/tty[pqrs]*
                    404:
                    405: # check the password temp/lock file
                    406: if [ -f /etc/ptmp ]
                    407: then
                    408:        logger -s -p auth.err \
                    409:        'password file may be incorrect -- /etc/ptmp exists'
                    410: fi
                    411:
1.112     mrg       412: # XXX replace me with a script that works!
1.85      perry     413: virecovery=`echo /var/tmp/vi.recover/recover.*`
1.32      mycroft   414: if [ "$virecovery" != "/var/tmp/vi.recover/recover.*" ]; then
                    415:        echo preserving editor files
                    416:        for i in $virecovery; do
1.129     christos  417:                if [ -f $i ]; then
                    418:                        sendmail -t < $i
                    419:                fi
1.32      mycroft   420:        done
                    421: fi
1.1       cgd       422:
                    423: echo clearing /tmp
                    424:
1.65      mikel     425: # Prune quickly with one rm, then use find to clean up /tmp/[lq]* (this
                    426: # is not needed with mfs /tmp, but doesn't hurt anything).
1.1       cgd       427: (cd /tmp && rm -rf [a-km-pr-zA-Z]* &&
1.46      deraadt   428:     find . ! -name . ! -name lost+found ! -name quota.user \
                    429:        ! -name quota.group -exec rm -rf -- {} \; -type d -prune)
1.1       cgd       430:
1.74      perry     431: # Update kernel info in /etc/motd
                    432: # Must be done *before* interactive logins are possible to prevent
                    433: # possible race conditions.
1.89      cjs       434: if checkyesno update_motd; then
1.74      perry     435:        echo 'updating motd.'
                    436:        if [ ! -f /etc/motd ]; then
                    437:                install -c -o root -g wheel -m 664 /dev/null /etc/motd
                    438:        fi
1.128     christos  439:        T=/etc/_motd
1.74      perry     440:        rm -f $T
                    441:        sysctl -n kern.version | sed 1q > $T
                    442:        echo "" >> $T
                    443:        sed '1,/^$/d' < /etc/motd >> $T
                    444:        cmp -s $T /etc/motd || cp $T /etc/motd
                    445:        rm -f $T
                    446: fi
                    447:
1.137     lukem     448: if checkyesno accounting; then
                    449:        if [ -f /var/account/acct ]; then
                    450:                echo 'turning on accounting'
                    451:                accton /var/account/acct
                    452:        else
                    453:                echo
                    454:                logger -s "WARNING: /var/account/acct doesn't exist; " \
                    455:                    "accounting not enabled."
                    456:        fi
1.34      cgd       457: fi
1.1       cgd       458:
                    459: echo -n standard daemons:
1.110     jwise     460: if checkyesno cron; then
                    461:        echo -n ' cron';                cron
                    462: fi
1.1       cgd       463: echo '.'
                    464:
1.63      mrg       465: # now start all the other daemons
1.1       cgd       466: echo -n starting network daemons:
                    467:
1.89      cjs       468: if checkyesno gated && checkyesno routed; then
                    469:        echo
                    470:        logger -s "WARNING: gated and routed both requested to be run: " \
                    471:            "running only gated."
                    472:        routed=NO
                    473: fi
                    474:
                    475: if checkyesno gated; then
                    476:        if [ -r /etc/gated.conf ]; then
                    477:                echo -n ' gated';               gated $gated_flags
                    478:        else
                    479:                logger -s "WARNING: no /etc/gated.conf; gated not started."
1.67      mycroft   480:        fi
1.89      cjs       481: fi
                    482:
                    483: if checkyesno routed; then
1.48      mycroft   484:        echo -n ' routed';              routed $routed_flags
1.1       cgd       485: fi
                    486:
1.89      cjs       487: if checkyesno mrouted; then
1.55      thorpej   488:        echo -n ' mrouted';             mrouted $mrouted_flags
1.127     itojun    489: fi
                    490:
                    491: if checkyesno route6d; then
                    492:        echo -n ' route6d';             route6d $route6d_flags
                    493: fi
                    494:
1.130     itojun    495: if checkyesno rtsold; then
                    496:        if checkyesno ip6forwarding; then
                    497:                logger -s "WARNING: rtsold cannot be used on IPv6 router."
                    498:        else
                    499:                echo -n ' rtsold';      rtsold $rtsold_flags
                    500:        fi
                    501: fi
                    502:
1.127     itojun    503: if checkyesno rtadvd; then
1.130     itojun    504:        if checkyesno ip6forwarding; then
                    505:                echo -n ' rtadvd';      rtadvd $rtadvd_flags
                    506:        else
                    507:                logger -s "WARNING: rtadvd cannot be used on IPv6 host."
                    508:        fi
1.55      thorpej   509: fi
                    510:
1.89      cjs       511: if checkyesno timed; then
1.67      mycroft   512:        echo -n ' timed';               timed $timed_flags
1.63      mrg       513: fi
                    514:
1.89      cjs       515: if checkyesno xntpd; then
1.67      mycroft   516:        echo -n ' xntpd';               xntpd $xntpd_flags
1.61      mrg       517: fi
                    518:
1.89      cjs       519: if checkyesno dhcpd; then
                    520:        if [ -r /etc/dhcpd.conf ]; then
                    521:                echo -n ' dhcpd';               dhcpd $dhcpd_flags
                    522:        else
                    523:                echo
                    524:                logger -s "WARNING: /etc/dhcpd.conf not readable; " \
                    525:                    "dhcpd not started."
1.67      mycroft   526:        fi
1.122     sommerfe  527: elif checkyesno dhcrelay; then
                    528:        echo -n ' dhcrelay';            dhcrelay $dhcrelay_flags
1.29      mycroft   529: fi
                    530:
1.89      cjs       531: if checkyesno rwhod; then
1.48      mycroft   532:        echo -n ' rwhod';               rwhod
1.1       cgd       533: fi
                    534:
1.89      cjs       535: if checkyesno lpd; then
                    536:        echo -n ' lpd';                 lpd $lpd_flags
1.60      tls       537: fi
                    538:
1.63      mrg       539: # We call sendmail with a full path so that SIGHUP works.
1.89      cjs       540: if checkyesno sendmail; then
                    541:        if [ -r /etc/sendmail.cf ]; then
                    542:                echo -n ' sendmail';    /usr/sbin/sendmail $sendmail_flags
                    543:        else
                    544:                echo
                    545:                logger -s "WARNING: /etc/sendmail.cf not readable; " \
                    546:                    "sendmail not started."
1.67      mycroft   547:        fi
1.60      tls       548: fi
                    549:
1.96      jonathan  550: # Start xfs before boot daemons, so its ready before client xterminals.
                    551: if checkyesno xfs; then
                    552:        echo -n ' xfs';                 xfs $xfs_flags &
1.98      perry     553:        sleep 2
1.96      jonathan  554: fi
                    555:
1.89      cjs       556: if checkyesno rarpd; then
                    557:        if [ -r /etc/ethers ]; then
                    558:                echo -n ' rarpd';       rarpd $rarpd_flags
                    559:        else
                    560:                echo
                    561:                logger -s "WARNING: /etc/ethers not readable; " \
                    562:                    "rarpd not started."
1.67      mycroft   563:        fi
1.60      tls       564: fi
                    565:
1.89      cjs       566: if checkyesno rbootd; then
                    567:        if [ -r /etc/rbootd.conf ]; then
                    568:                echo -n ' rbootd';      rbootd $rbootd_flags
                    569:        else
                    570:                echo
                    571:                logger -s "WARNING: /etc/rbootd.conf not readable; " \
1.111     mrg       572:                    "rbootd not started."
1.67      mycroft   573:        fi
1.72      cjs       574: fi
                    575:
1.89      cjs       576: if checkyesno mopd; then
1.72      cjs       577:        echo -n ' mopd';                mopd $mopd_flags
1.86      perry     578: fi
                    579:
1.89      cjs       580: if checkyesno apmd; then
1.86      perry     581:        echo -n ' apmd';                apmd $apmd_flags
1.103     mrg       582: fi
                    583:
                    584: if checkyesno screenblank; then
                    585:        echo -n ' screenblank';         screenblank $screenblank_flags
1.52      thorpej   586: fi
                    587:
1.89      cjs       588: if checkyesno inetd; then
                    589:        if [ -r /etc/inetd.conf ]; then
                    590:                echo -n ' inetd';       inetd $inetd_flags
                    591:        else
                    592:                echo
                    593:                logger -s "WARNING: /etc/inetd.conf not readable; " \
                    594:                    "inetd not started."
1.67      mycroft   595:        fi
1.96      jonathan  596: fi
                    597:
1.1       cgd       598: echo '.'
1.73      perry     599:
                    600: # Kerberos runs ONLY on the Kerberos server machine
1.89      cjs       601: if checkyesno kerberos; then
1.73      perry     602:        echo -n 'starting kerberos daemons:'
                    603:        echo -n ' kerberos';    kerberos >> /var/log/kerberos.log &
                    604:        echo -n ' kadmind';     kadmind -n >> /var/log/kadmind.log &
                    605:        echo '.'
1.123     drochner  606: fi
                    607:
                    608: # xdm after wscons - need a virtual screen for X
                    609: if checkyesno xdm; then
                    610:        echo 'starting xdm'
                    611:        xdm $xdm_flags
1.73      perry     612: fi
1.1       cgd       613:
1.25      mycroft   614: . /etc/rc.local
1.1       cgd       615:
                    616: date
                    617: exit 0

CVSweb <webmaster@jp.NetBSD.org>