home *** CD-ROM | disk | FTP | other *** search
/ Chip 1995 March / CHIP3.mdf / slackwar / a / util / util-lin.2 / util-lin / util-linux-2.2 / example.files / rc.local < prev    next >
Encoding:
Text File  |  1995-02-22  |  2.7 KB  |  88 lines

  1. # rc.local file for The Linux BOGUS Release, version 1.0.1
  2.  
  3.                                 echo -n "Local initialization: "
  4.  
  5. # Set the host name.  You will probably want to change this.
  6.                                 echo -n "hostname "
  7. hostname winter
  8.  
  9. # Update the system time from the CMOS clock.
  10. # This assume that the CMOS clock is in local time, and that you have the
  11. # correct links in /usr/src/zoneinfo (see zic(8) for details.  (For example,
  12. # for the east coast of the US, do: zic -l US/Eastern -p America/NewYork)
  13. # Note: mount /usr BEFORE running rc.local!
  14.                                 echo -n "clock "
  15. clock -a
  16.  
  17. # Set screen blanker to 5 minutes.
  18.                                 echo -n "screen-blanking "
  19. setterm -blank 5
  20.  
  21. # Set modem for 57600 bps
  22. if [ -e /dev/modem ]
  23. then
  24.                                 echo -n "high-speed-modem "
  25.     setserial /dev/modem spd_hi
  26. fi
  27.  
  28. # Make the keyboard repeat rate and delay reasonable.
  29.                                 echo -n "keyboard "
  30. kbdrate -r 24 -d 250 >& /dev/null
  31.  
  32. # Make CTRL-ALT-DEL do a controlled reboot (i.e., call reboot(8))
  33.                                 echo -n "reboot "
  34. ctrlaltdel soft
  35.  
  36. # Preserve elvis files in case of a crash
  37.                                 echo -n "vi-files "
  38. elvprsv "-the system went down" /tmp/elv_*.*
  39.  
  40.                                 echo
  41.  
  42.  
  43.                                 echo -n "Starting daemons: "
  44.  
  45. # Make sure log files exist
  46. if [ -d /var/adm ]; then
  47.     if [ ! -e /var/adm/kernlog ];  then touch /var/adm/kernlog;  fi
  48.     if [ ! -e /var/adm/syslog ];   then touch /var/adm/syslog;   fi
  49.     if [ ! -e /var/adm/maillog ];  then touch /var/adm/maillog;  fi
  50.     if [ ! -e /var/adm/authlog ];  then touch /var/adm/authlog;  fi
  51.     if [ ! -e /var/adm/news ];     then touch /var/adm/news;     fi
  52.     if [ ! -e /var/adm/daemon ];   then touch /var/adm/daemon;   fi
  53.     if [ ! -e /var/adm/lpd-errs ]; then touch /var/adm/lpd-errs; fi
  54.     if [ ! -e /var/adm/sysdebug ]; then touch /var/adm/sysdebug; fi
  55.  
  56.     # start up syslogd if it exists, but wait until AFTER HOSTNAME SET
  57.     if [ -f /usr/sbin/syslogd ]; then
  58.                                 echo -n "syslogd "
  59.         /usr/sbin/syslogd
  60.     fi
  61. fi
  62.  
  63. # Start up cron if it exists
  64. if [ -f /usr/sbin/cron ]
  65. then
  66.                                 echo -n "cron "
  67.     /usr/sbin/cron
  68. fi
  69.  
  70.                                 echo
  71.  
  72. # If you want networking turned on, then uncomment the following lines.
  73. if [ -f /etc/NETWORKING_IS_ON ]
  74. then
  75.         if [ -f /etc/rc.net ]
  76.         then
  77.                 /bin/sh /etc/rc.net
  78.         fi
  79. fi
  80.  
  81.                                 echo "Mounting foreign file systems"
  82. mount -avt nfs,msdos,hpfs
  83.  
  84. # Create a new issue file
  85. echo > /etc/issue
  86. echo "Welcome to `hostname`, an `uname -m` running BOGUS Release 1.0.1 `uname` `uname -r`" >> /etc/issue
  87. echo >> /etc/issue
  88.