~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

Minix Cross Reference
Minix/etc/rc


  1 # This file performs various system initializations.
  2 
  3 umask 022
  4 PATH=/usr/local/bin:/bin:/usr/bin
  5 export PATH
  6 
  7 # National keyboard?
  8 test -f /etc/keymap && loadkeys /etc/keymap
  9 
 10 # Set timezone.  (If the clock tells GMT then put this after 'date'.)
 11 . /etc/profile
 12 
 13 # Try to read the hardware real-time clock, if there is one, to set the date
 14 # date `readclock`    Not on smx 
 15 
 16 # Initialize files.
 17 printroot >/etc/mtab                    # /etc/mtab keeps track of mounts
 18 >/etc/utmp                              # /etc/utmp keeps track of logins
 19 
 20 # /etc/fstab lists the root, tmp and usr devices.
 21 . /etc/fstab
 22 
 23 # Mount the /usr partition unless it is a single floppy Minix.
 24 if [ ! -f /usr/bin/shutdown ]
 25 then
 26         case $usrbin in
 27         unknown)
 28                 # We need to ask what the /usr/bin du jour is.
 29                 echo -n "Finish the name of device to mount as /usr/bin: /dev/"
 30                 read usrbin
 31                 usrbin=/dev/$usrbin
 32         esac
 33 
 34 # 051229: added -r
 35         mount $usrbin /usr/bin -r
 36 fi
 37 
 38 # Check if the system crashed.
 39 if shutdown -C
 40 then
 41 
 42         umount $usrbin
 43         echo
 44         echo "The system was not properly shut down.  Checking file systems."
 45 
 46         fsck -r $root
 47         fsck -r $usrbin
 48         fsck -r $man
 49 
 50 # 051229: added -r
 51         mount $usrbin /usr/bin -r
 52 fi
 53 
 54 # 051229: added -r
 55 mount $man /usr/man -r 
 56 
 57 case "`printroot -r`" in
 58 /dev/ram)
 59         # Don't need these things clogging up the RAM disk
 60         rm -rf /boot /minix
 61 esac
 62 
 63 # National font?
 64 test -f /etc/font && loadfont /etc/font
 65 
 66 echo -n "Starting standard daemons:"
 67 test -f /usr/lib/crontab && cron=cron
 68 for daemon in update $cron
 69 do
 70         if [ -f /usr/bin/$daemon ]
 71         then
 72                 echo -n " $daemon"
 73                 $daemon &
 74         fi
 75 done
 76 echo .
 77 
 78 # Network initialization.  To disable network initialisation, simply
 79 # uncomment out the following line and comment out the line that
 80 # sets net to true
 81 #net=false
 82 (</dev/eth </dev/tcp) 2>/dev/null && net=true   # Is there a TCP/IP server?
 83 
 84 if [ "$net" = "true" ] && [ -f /etc/rc.net ]
 85 then
 86         . /etc/rc.net
 87 else
 88         echo noname >/etc/hostname.file
 89 fi
 90 
 91 # Don't let wtmp grow indefinitely.
 92 find /usr/adm/wtmp -size +100 -exec sh -c \
 93         "cp /usr/adm/wtmp /usr/adm/wtmp.1; >/usr/adm/wtmp" \; 2>/dev/null
 94 
 95 # Cleanup.
 96 test -f /usr/bin/elvprsv && elvprsv /usr/tmp/elv*
 97 rm -rf /tmp/. /usr/tmp/. /usr/spool/lpd/. /usr/spool/locks/.
 98 
 99 # Any messages?
100 test -f /etc/issue && cat /etc/issue

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

This page was automatically generated by the LXR engine.
Visit the LXR main site for more information.