home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 4.0 PR1 / NeXT_NEXTSTEP_4.0_PR1_(beta).rar / Openstep4-Pr1User.iso / private / etc / rc.standard < prev    next >
Text File  |  1995-07-28  |  20KB  |  602 lines

  1. #!/bin/sh -u
  2. #
  3. # This is the multi-user startup script.
  4. #
  5. # Copyright (C) 1992 by NeXT Computer, Inc.  All rights reserved.
  6. #
  7. # Note that all "echo" commands are in parentheses so that
  8. # the main shell does not open a tty and get its process group set.
  9.  
  10. #
  11. # Avoid bailing out on ^C's.  This is needed both for security reasons
  12. # as well as for the "Press Control-C to continue without a network"
  13. # interaction (under ifconfig in rc.net) to function properly.
  14. #
  15. trap "/bin/true" 2
  16.  
  17. #
  18. # Initialize the path to be used and inherited by all the commands herein
  19. #
  20. if [ -f /.path ]; then
  21.     . /.path
  22. else
  23.     PATH=/usr/ucb:/bin:/usr/bin:/etc:/usr/etc; export PATH
  24.     HOME=/; export HOME
  25. fi
  26.  
  27. fbshow -B -E
  28. fbshow -B -I "Initializing system" -z 9
  29.  
  30.  
  31. # Are we booting from a CD-ROM?  If so, switch over to /etc/rc.cdrom.
  32.  
  33. if [ -d /NextCD -a -f /private/etc/rc.cdrom ]; then
  34.     /bin/sh /private/etc/rc.cdrom $1
  35.     (echo "CD-ROM boot procedure complete.")    >>/dev/console
  36.     /etc/halt -e
  37.     exit 0
  38. fi
  39.  
  40. # Start the Mach network message server, which forwards Mach IPC over the
  41. # network and provides a name-to-port mapping service.
  42. # We need to start the nmserver here because any of Config's device drivers
  43. # may need to register themselves with the name server.  Unfortuntely, the
  44. # network isn't ready yet, but that's OK since we tell the nmserver to
  45. # reinitialize its network code later in rc.net.
  46.  
  47. if [ -f /usr/etc/nmserver ]; then
  48.     /usr/etc/nmserver -nonet >/dev/console 2>&1
  49. fi
  50.  
  51. # Configure kern-loaded drivers - not on 68k (driverkit only)
  52. if [ `/usr/bin/arch` != m68k -a -f /usr/etc/driverLoader ]; then
  53.     (echo "Configuring Device Drivers")         >/dev/console
  54.     fbshow -B -I "Configuring drivers" -z 14
  55.     /usr/etc/driverLoader a >/dev/console 2>&1
  56. fi
  57.  
  58. for i in /dev/nrst*
  59. do
  60.     if [ -c $i ]; then
  61.         /usr/etc/stblocksize $i
  62.         (echo "Setting tape block size for $i")    > /dev/console
  63.     fi
  64. done
  65. #
  66. # Configure network & hostname
  67. #
  68. fbshow -B -I "Configuring network" -z 18
  69. sh /etc/rc.net -h >/dev/console
  70.  
  71. #
  72. #  Determine if the network is up by looking for any non-loopback
  73. #  internet network interfaces.
  74. #
  75. if ifconfig -a | grep -v "127.0.0.1" | grep -v "0.0.0.0" | grep -s inet; then
  76.     NETWORKUP=-YES-
  77. else
  78.     NETWORKUP=-NO-
  79. fi
  80.  
  81.  
  82. # Print out an appropriate message.  MESSAGE is used later in the log.
  83.  
  84. if  [ $1x = autobootx ]; then
  85.     # (echo Automatic reboot in progress...)        >/dev/console
  86.     MESSAGE="Reboot"
  87. else
  88.     (echo Multiuser startup in progress...)            >/dev/console
  89.     MESSAGE="Multi-user startup"
  90. fi
  91.  
  92. # Check for and mount swapdisks.
  93. sh /etc/rc.swap $1
  94.  
  95. # Mount local filesystems (according to /etc/fstab).
  96. mount -vat 4.3                        >/dev/console 2>&1
  97.  
  98. # Display a message in the iconic boot window.
  99. fbshow -B -I "Checking system files" -z 23
  100.  
  101. # Attempt to recover the passwd file, if needed.  This procedure is
  102. # primarily historical and makes sense only when the passwd file is edited
  103. # using the vipw command.  
  104.  
  105. if [ -s /etc/ptmp ]; then
  106.     if [ -s /etc/passwd ]; then
  107.         (echo 'Passwd file conflict with ptmp:')    >/dev/console
  108.         ls -l /etc/passwd /etc/ptmp            >/dev/console
  109.         (echo 'Moving ptmp to ptmp.save.')        >/dev/console
  110.         mv -f /etc/ptmp /etc/ptmp.save
  111.     else
  112.         (echo 'Passwd file recovered from ptmp.')     >/dev/console
  113.         mv /etc/ptmp /etc/passwd
  114.     fi
  115. elif [ -r /etc/ptmp ]; then
  116.     (echo 'Removing passwd lock file')            >/dev/console
  117.     /bin/rm -f /etc/ptmp
  118. fi
  119.  
  120. # Start the virtual memory system.
  121. /usr/etc/mach_swapon -av                >/dev/console 2>&1
  122.  
  123. (echo -n 'Cleaning up:')                >/dev/console
  124.  
  125. # If the shutdown command was used to shut the system down, the file
  126. # /etc/nologin may have been created to prevent users from logging in.  
  127. # Remove it so that logins are enabled when the system comes up.
  128.  
  129. /bin/rm -f /etc/nologin
  130. (echo -n ' /etc/nologin')                >/dev/console
  131.  
  132. # Reset pseudo-terminals (ptys) to their default states.
  133. /usr/etc/chown root.tty /dev/tty[pqrs]*
  134. /bin/chmod 666 /dev/tty[pqrs]*
  135. (echo -n ' ptys')                    >/dev/console
  136.  
  137. # Reset permissions and ownership of raw live floppy devices.
  138. # Loginwindow changes these to be owned by the logged in user.
  139. /usr/etc/chown root.operator /dev/rfd[01]b
  140. /bin/chmod 660 /dev/rfd[01]b
  141. (echo -n ' floppy devices')                                   >/dev/console
  142.  
  143. # Recover files being edited by ex, vi, or e when the system was restarted.
  144. (cd /tmp; /usr/lib/ex3.7preserve -a)
  145. (echo -n ' editors')                     >/dev/console
  146.  
  147. # Clean out /tmp.
  148. (cd /tmp; find . ! -name . ! -name lost+found ! -name quotas \
  149.     -exec rm -r - {} \; )
  150. (echo -n ' /tmp')                    >/dev/console
  151.  
  152. # Clear empty subdirectories of /Net.
  153. (cd /private/Net; find . -xdev ! -name . -type d -exec rmdir {} \;)
  154.  
  155. # Clear symlinks from /Net, too.
  156. (cd /private/Net; find . -xdev ! -name . -type l -exec rm {} \;)
  157. (echo -n ' /Net')                    >/dev/console
  158.  
  159. (echo '.')                        >/dev/console
  160.  
  161. # Syslog must be started before daemons are launched from rc.local.
  162. # This allows appropriate log messages to find their way to the console.
  163.  
  164. (echo -n Starting early daemons:)                >/dev/console
  165. fbshow -B -I "Starting background services" -z 27
  166. if [ -f /usr/etc/syslogd -a -f /etc/syslog.conf ]; then
  167.     /bin/rm -f /dev/log
  168.     # If you want a timestamp to be logged periodically,
  169.     # modify the invocation of syslogd below.  For example, 
  170.     # for a half-hourly timestamp, add the argument "-m30".
  171.     /usr/etc/syslogd  && (echo -n ' syslogd')        >/dev/console
  172. fi
  173. (echo '.')                            >/dev/console
  174.  
  175. # Read the configuration information set by the HostManager application.
  176. . /etc/hostconfig
  177.  
  178. # Set up NIS domain.
  179.  
  180. if [ "${YPDOMAIN=-NO-}" != "-NO-" -a $NETWORKUP = "-YES-" ]; then
  181.     (echo "Setting NIS domainname to $YPDOMAIN")        >/dev/console
  182.     domainname $YPDOMAIN                >/dev/console 2>&1
  183. fi
  184.  
  185. # Rpc and net services are the minimal set needed to use the network.
  186. (echo -n 'Starting RPC and network services:')            >/dev/console
  187.  
  188. # Start the Mach network message server, which forwards Mach IPC over the
  189. # network and provides a name-to-port mapping service.
  190. #
  191. #if [ -f /usr/etc/nmserver ]; then
  192. #    /usr/etc/nmserver &                >/dev/console 2>&1
  193. #    (echo -n ' nmserver')                    >/dev/console
  194. #fi
  195.  
  196. # portmap converts Sun RPC program numbers into IP port numbers.
  197.  
  198. if [ -f /usr/etc/portmap ]; then
  199.     /usr/etc/portmap && (echo -n ' portmap')         >/dev/console
  200. fi
  201.  
  202. # Turn on IP routing.  If an explicit route is specified (the '*'
  203. # clause), either an IP address must be used or the router's hostname 
  204. # and IP address must be specified in the /etc/hosts file.  
  205. # Set the 'q' (quiet) flag by default to avoid broadcasting routes
  206. # all over the place.  [This should probably be an option.]
  207.  
  208. case ${ROUTER=-NO-} in
  209.     -ROUTED-)
  210.     if [ -f /usr/etc/routed -a $NETWORKUP = "-YES-" ]; then
  211.         /usr/etc/routed -q && (echo -n ' routed')    >/dev/console
  212.     fi
  213.     ;;
  214.     -NO-)
  215.     ;;
  216.     *)
  217.     if [ -f /usr/etc/route ]; then
  218.         /usr/etc/route add default $ROUTER 1    >/dev/console 2>&1
  219.     fi
  220.     ;;
  221. esac
  222.  
  223. # Start up the netinfo daemons.  This will only complete when the
  224. # local domain has bound to its parent domain, if it has a parent
  225. # (that is, if the machine is on a NetInfo network).  The message:
  226. #
  227. #   Still searching for parent network administration (NetInfo) server.
  228. #   Please wait, or press 'c' to continue without network user accounts.
  229. #   See your system administrator if you need help.
  230. #
  231. # comes from the local domain's netinfod; typically, you can wait a minute
  232. # or two and the local domain will eventually find a parent. As the
  233. # message says, the system is still searching for a parent server.
  234. # Typing 'c' aborts that search, which is probably not what you want.  
  235. # (You're most likely to see this message on a network-wide NetInfo server.)
  236. #
  237. # If you would like to customize this message to include the name or
  238. # telephone number of a network administrator, edit the text of the
  239. # message in /usr/lib/NextStep/Resources/English.lproj/NetInfo.strings,
  240. # or its equivalent for your usual boot language.
  241.  
  242. if [ -f /usr/etc/nibindd ]; then
  243.     fbshow -B -I "Starting network services" -z 32
  244.     /usr/etc/nibindd && (echo -n ' netinfo')    >/dev/console 2>&1
  245. fi
  246.  
  247. # If we are in an NIS domain, start up the appropiate services.
  248.  
  249. if [ "$YPDOMAIN" != "-NO-" -a $NETWORKUP = "-YES-" ]; then
  250.     fbshow -B -I "Starting YP services" -z 36
  251.     # ypserv is run on NIS servers - machines with an /etc/yp/XXX dir
  252.     if [ -f /usr/etc/ypserv -a -d /etc/yp/$YPDOMAIN ]; then
  253.         /usr/etc/ypserv && (echo -n ' ypserv')        >/dev/console
  254.     fi
  255.     if [ -f /usr/etc/ypbind ]; then
  256.         /usr/etc/ypbind && (echo -n ' ypbind')        >/dev/console
  257.     fi
  258. fi
  259.  
  260. # The lookup daemon, lookupd, provides information to client programs
  261. # through the standard C library (such as gethostbyname()).  It obtains
  262. # the information from various network services: NetInfo, DNS (also called
  263. # the Domain Name Service - named - and BIND), and NIS.
  264.  
  265. if [ -f /usr/etc/nibindd -a -f /usr/etc/lookupd ]; then
  266.     fbshow -B -I "Starting naming services" -z 41
  267.     /usr/etc/lookupd && (echo -n ' lookupd')        >/dev/console
  268. fi
  269.  
  270. # Start up time service.  If you're doing any sort of network file 
  271. # access, be sure NTP is enabled and properly configured, or you may 
  272. # see very strange errors and file consistency problems.
  273. #
  274. # NeXT's ntpd has been modified to acquire the NTP server
  275. # configuration from NetInfo (the /locations/ntp directory).
  276.  
  277. case ${TIME=-AUTOMATIC-} in
  278.     -AUTOMATIC-)
  279.     if [ -f /usr/etc/ntpd -a $NETWORKUP = "-YES-" ]; then
  280.         # Synchronize our clock to the network's time.
  281.         /usr/etc/ntp -F             >/dev/null
  282.         # Fire off ntpd to keep the clock in sync.
  283.         /usr/etc/ntpd && (echo -n ' ntpd')    >/dev/console
  284.     fi
  285.     ;;
  286.     -NO-)
  287.     ;;
  288.     *)
  289.     ;;
  290. esac
  291.  
  292. # biod is the NFS asynchronous block I/O daemon, which implements
  293. # NFS read-ahead and write-behind caching on NFS clients.
  294.  
  295. if [ -f /usr/etc/biod -a $NETWORKUP = "-YES-" ]; then
  296.     fbshow -B -I "Starting I/O services" -z 45
  297.     /usr/etc/biod 4 && (echo -n ' biod')             >/dev/console
  298. fi
  299.  
  300. (echo '.')                            >/dev/console
  301.  
  302. # Mount remote filesystems.
  303. fbshow -B -I "Mounting file systems" -z 50
  304. (echo 'Mounting remote filesystems')                >/dev/console
  305. mount -at nfs                         >/dev/console 2>&1
  306.  
  307. fbshow -B -I "Starting system services" -z 54
  308.  
  309. # Fileservice daemons are needed to import and export filesystems.
  310. (echo -n 'Starting file service daemons:')            >/dev/console
  311.  
  312. # If AppleTalk (EtherTalk) is desired, start up the AppleTalk daemon.
  313.  
  314. if [ -f /usr/etc/atalkd ]; then
  315.     fbshow -B -I "Starting AppleTalk" -z 59
  316.     if /usr/etc/atalkd >/dev/console 2>&1; then
  317.     (echo -n ' atalkd')                >/dev/console
  318.       fi
  319. fi
  320.  
  321. # Start the automounter only if /Net is a directory that is not
  322. # a symlink (symlinks to directories qualify as directories to test's
  323. # -d operation).
  324.  
  325. if [ -h /Net -o -f /Net ]; then
  326.     (echo "Warning: NeXT NFS automounter did not run.")    >/dev/console
  327. else
  328.     if [ -f /usr/etc/autonfsmount -a $NETWORKUP = "-YES-" ]; then
  329.         # The autonfsmounter will attempt a remount every 10 seconds,
  330.         # cache names for 12 hours [43200 seconds], mount things in
  331.         # /private/Net, ignore any NIS auto.master map, be triggered
  332.         # by references in the /Net directory, and use the fstab
  333.         # map (i.e., look in the mounts database -- /mounts in NetInfo,
  334.         # for example) to locate remote filesystems.
  335.         fbshow -B -I "Starting automounter" -z 63
  336.         /usr/etc/autonfsmount    -tm 10 -tl 43200 \
  337.                     -a /private -m /Net -fstab \
  338.         && (echo -n ' autonfsmount') >/dev/console 2>&1
  339.     fi
  340. fi
  341.  
  342. # If exportfs finds something to export (either using /etc/exports or the
  343. # exports NetInfo directory), then start the NFS daemons (which service
  344. # NFS requests) and the mount server (which services NFS mount requests).
  345.  
  346. if [ -f /usr/etc/exportfs ]; then
  347.     # Clear the table of exported filesystems before running exportfs.
  348.     > /etc/xtab
  349.     fbshow -B -I "Exporting filesystems" -z 68
  350.     if /usr/etc/exportfs -a >/dev/console 2>&1; then
  351.     # There is no "right" number of nfsd's. Infrequently-accessed
  352.     # servers can get by with 4 or fewer.  8 is not excessive for 
  353.     # heavily-loaded servers.
  354.     /usr/etc/nfsd 6 && (echo -n ' nfsd')         >/dev/console
  355.     /usr/etc/rpc.mountd && (echo -n ' rpc.mountd')    >/dev/console 2>&1
  356.     fi
  357. fi
  358.  
  359. # If AppleShare is desired, start up the AppleShare daemon.
  360.  
  361. if [ -f /usr/etc/ashared ]; then
  362.     fbshow -B -I "Starting AppleShare" -z 72
  363.     if /usr/etc/ashared >/dev/console 2>&1; then
  364.     (echo -n ' ashared')                >/dev/console
  365.       fi
  366. fi
  367.  
  368. # If we are a Network Master become a BOOTP and BOOTPARAM server.  This is
  369. # the only thing that depends on the value of NETMASTER from /etc/hostconfig.
  370.  
  371. if [ "${NETMASTER=-NO-}" = "-YES-" ]; then
  372.     # If /etc/bootptab file exists, become a BOOTP server.  Note
  373.     # that bootpd gets information from /etc/bootptab even when
  374.     # NetInfo is running (the per-client information comes from
  375.     # NetInfo; the global information comes from /etc/bootptab).
  376.     if [ -f /usr/etc/bootpd -a -f /etc/bootptab ]; then
  377.         /usr/etc/bootpd && (echo -n ' bootpd')        >/dev/console
  378.     fi
  379.  
  380.     # bootparamd doesn't need a flat file.
  381.     if [ -f /usr/etc/rpc.bootparamd ]; then
  382.         /usr/etc/rpc.bootparamd && \
  383.         (echo -n ' rpc.bootparamd')            >/dev/console
  384.     fi
  385. fi
  386.  
  387. # Run the arpLoader to make permanent ARP entries for SPARC clients.
  388. # Does nothing if this system is not a NetInstall server or if the 
  389. # server has no SPARC clients.
  390. if [ -f /usr/etc/arpLoader ]; then
  391.     /usr/etc/arpLoader
  392. fi
  393.  
  394. (echo '.')                            >/dev/console
  395.  
  396. # Network daemons provide service to the outside world.
  397. (echo -n Starting network daemons:)                >/dev/console
  398. fbshow -B -I "Starting network daemons" -z 77
  399.  
  400. # Run the Internet server daemon.
  401. if [ -f /usr/etc/inetd ]; then
  402.     /usr/etc/inetd && (echo -n ' inetd')            >/dev/console
  403. fi
  404.  
  405. # Remove junk from the outbound mail queue directory and start up
  406. # the sendmail daemon. /usr/spool/mqueue is assumed here even though
  407. # it can be changed in the sendmail configuration file.
  408. #
  409. # sendmail is started even if there's no configuration file
  410. # in /etc/sendmail/sendmail.cf.  sendmail can find a configuration file
  411. # based on information in NetInfo (the sendmail.cf property in the 
  412. # /locations/sendmail directory). If no sendmail configuration file 
  413. # exists, sendmail will exit with an appropriate error message.
  414. #
  415. # Any messages which end up in the queue, rather than being delivered
  416. # or forwarded immediately, will be processed once each hour.
  417.  
  418. if [ -f /usr/lib/sendmail ]; then
  419.     (cd /usr/spool/mqueue; rm -f nf* lf*)
  420.     /usr/lib/sendmail -bd -q1h 2>/dev/console && \
  421.         (echo -n ' sendmail')    >/dev/console
  422. fi
  423.  
  424. # lpd is the Berkeley line printer daemon.
  425.  
  426. if [ -f /usr/lib/lpd ]; then
  427.     rm -f /dev/printer
  428.     /usr/lib/lpd && (echo -n ' printer')            >/dev/console
  429. fi
  430.  
  431. # Start an SNMP agent if configured to do so.
  432.  
  433. if [ -f /usr/etc/snmpd ]; then
  434.     if /usr/etc/snmpd -N >/dev/console 2>&1; then
  435.         (echo -n ' snmpd')                >/dev/console
  436.     fi
  437. fi
  438.  
  439. (echo '.')                            >/dev/console
  440.  
  441. # NeXT services support the application environment
  442. (echo -n 'Starting NeXT services:')                >/dev/console
  443. fbshow -B -I "Starting NeXT services" -z 81
  444.  
  445. # The pasteboard server is used by the AppKit.
  446.  
  447. if [ -f /usr/etc/pbs ]; then
  448.     /usr/etc/pbs &&    (echo -n ' pbs')            >/dev/console
  449. fi
  450.  
  451. # exec_faxes starts up any appropriate fax modem daemons.
  452.  
  453. if [ -f /usr/lib/NextPrinter/exec_faxes ]; then
  454.     /usr/lib/NextPrinter/exec_faxes && (echo -n ' exec_faxes')    >/dev/console
  455. fi
  456.  
  457. # If ISDN Networking is desired, start up the PhoneConnector in daemon mode.
  458.  
  459. /usr/bin/niutil -read . /localconfig/ISDN/Networking >/dev/null 2>&1
  460. if [ $? -eq 0 ]; then
  461.     if [ -f /NextAdmin/PhoneConnector.app/PhoneConnector ]; then
  462.         /NextAdmin/PhoneConnector.app/PhoneConnector -Daemon YES && \
  463.             (echo -n ' PhoneConnector')     >/dev/console
  464.     fi
  465. fi
  466.  
  467. (echo '.')                            >/dev/console
  468.  
  469. # Customizations to the startup sequence which load protocol
  470. # stacks such as AppleTalk should be placed in /etc/rc.local.protocols
  471. # This allows them to load before NetWare and get a right of first
  472. # refusal before NetWare on all incoming packets. When used with 802.3
  473. # framing, NetWare consumes all incoming packets and does not 
  474. # pass any on to protocol stacks loaded after NetWare.
  475.  
  476. if [ -f /etc/rc.local.protocols ]; then
  477.     sh /etc/rc.local.protocols $1
  478. fi
  479.  
  480. # If NetWare Networking is desired, start it.
  481.  
  482. ( /usr/bin/niutil -read . /localconfig/NetWare | \
  483.     /usr/bin/egrep 'enable.+YES' ) >/dev/null 2>&1
  484. if [ $? -eq 0 ]; then
  485.  
  486.     #   Don't start NetWare  unless there is at least one network interface up
  487.  
  488.     if [ -n "`ifconfig -a | grep en0 `" -o -n "`ifconfig -a | grep tr0 `" ]; then
  489.         (echo -n "Starting NetWare:")            >/dev/console 2>&1
  490.      fbshow -B -I "Starting NetWare" -z 86
  491.        # Load and start the kernel server.
  492.         if [ -f /usr/lib/kern_loader/nuc/nuc_reloc ]; then
  493.         /usr/etc/kl_util -a /usr/lib/kern_loader/nuc/nuc_reloc \
  494.         >/tmp/nuc_log 2>&1
  495.         (echo -n ' nuc_reloc ')                >/dev/console 2>&1
  496.         fi
  497.         if [ -f /usr/netware/bin/nucinit ]; then
  498.         /usr/netware/bin/nucinit            >/dev/console 2>&1
  499.         (echo -n ' nucinit')                >/dev/console 2>&1
  500.         fi
  501.  
  502.         # Configure the protocol stack.
  503.         if [ -f /usr/netware/etc/npsd ]; then
  504.         /usr/netware/etc/npsd && (echo -n ' npsd')    >/dev/console 2>&1
  505.         fi
  506.  
  507.         # Start the Management Portal, an internal port for communicating
  508.         # with the kernel server.
  509.         if [ -f /usr/netware/bin/nwmp ]; then
  510.         /usr/netware/bin/nwmp start && (echo -n ' nwmp') >/dev/console 2>&1
  511.         fi
  512.  
  513.         # Start the Netware Service Advertisement Protocol Daemon, which looks for
  514.         # NetWare servers' advertisement packets.
  515.         if [ -f /usr/netware/etc/sapd ]; then
  516.         /usr/netware/etc/sapd && (echo -n ' sapd')    >/dev/console 2>&1
  517.         fi
  518.  
  519.         # Start the NetWare automounter.
  520.         if [ -f /usr/etc/autoNetWaremount ]; then
  521.         /usr/etc/autoNetWaremount && (echo -n ' autoNetWaremount') \
  522.         >/dev/console 2>&1
  523.         fi
  524.     else
  525.         (echo -n 'No network interface: NetWare not started')    >/dev/console 2>&1
  526.     fi
  527.  
  528.     (echo '.')                            >/dev/console
  529. fi
  530.  
  531.  
  532. # InputManagers startup procedure (Japanese)
  533.  
  534. if [ -d /NextLibrary/InputManagers ]; then
  535.     (echo -n 'Starting input servers:')                >/dev/console
  536.     fbshow -B -I "Starting input servers" -z 90
  537.     for i in /NextLibrary/InputManagers/*
  538.     do
  539.         if [ -d $i ]; then
  540.             if [ $i = "/NextLibrary/InputManagers/Resources" ]; then
  541.                 continue
  542.             fi
  543.             rcfile=`basename $i`
  544.             if [ -f $i/${rcfile}.rc ]; then
  545.                 sh $i/${rcfile}.rc $1
  546.             fi
  547.         fi
  548.     done
  549.     (echo '.')                            >/dev/console
  550. fi
  551.  
  552. # Start up the 4.0 MessageService daemon
  553. if [ -f /usr/etc/MessageServiceDaemon.mess/MessageServiceDaemon ]; then
  554.     (echo -n Starting MessageServiceDaemon:)        >/dev/console
  555.     fbshow -B -I "Starting MessageServiceDaemon" -z 93
  556.     /usr/etc/MessageServiceDaemon.mess/MessageServiceDaemon >/dev/console 2>&1
  557. fi
  558.  
  559. # Any customizations to the startup sequence you would like to make should
  560. # be placed in /etc/rc.local; this way they can be preserved when your 
  561. # system is later upgraded to a new version of system software.
  562.  
  563. if [ -f /etc/rc.local ]; then
  564.     sh /etc/rc.local $1
  565. fi
  566.  
  567. # Unlock tip lines.  tip and UUCP share lock files so they don't get in
  568. # each other's way.
  569.  
  570. if [ -d /usr/spool/uucp ]; then
  571.     rm -f /usr/spool/uucp/LCK.*
  572.     rm -f /usr/spool/uucp/LCK/LCK.*
  573. fi
  574.  
  575. # Start standaard daemons that should always run
  576. (echo -n Starting standard daemons:)                >/dev/console
  577. fbshow -B -I "Starting standard daemons" -z 95
  578.  
  579. # update flushes the cached blocks from the filesystem using
  580. # the sync system call every 30 seconds.  This ensures the
  581. # disk is reasonably up-to-date in the event of a system crash.
  582.  
  583. update && (echo -n ' update')                    >/dev/console
  584.  
  585. # cron executes commands listed in /etc/crontab at specified times.
  586.  
  587. cron && (echo -n ' cron')                    >/dev/console
  588.  
  589. # accton is here for historical reasons.
  590.  
  591. # if [ -f /usr/adm/acct ]; then
  592. #    accton /usr/adm/acct && (echo -n ' accounting')        >/dev/console
  593. # fi
  594.  
  595. (echo '.')                            >/dev/console
  596.  
  597. # Submit a syslog note to indicate that we've successfully rebooted.
  598. /usr/ucb/logger -t reboot -p kern.crit "$MESSAGE complete"
  599. fbshow -B -I "Startup complete" -z 100
  600.  
  601. exit 0
  602.