diff options
author | dillon <dillon@FreeBSD.org> | 1998-12-12 23:04:21 +0000 |
---|---|---|
committer | dillon <dillon@FreeBSD.org> | 1998-12-12 23:04:21 +0000 |
commit | 3d6f93c5511014e58f4d67d4309e290557bd0d61 (patch) | |
tree | fcc50c07709e100584e962ef27cd12f76a1b68cb | |
parent | 408b593e63067f9bddbb31c26edd2b9469d500ce (diff) | |
download | FreeBSD-src-3d6f93c5511014e58f4d67d4309e290557bd0d61.zip FreeBSD-src-3d6f93c5511014e58f4d67d4309e290557bd0d61.tar.gz |
Reviewed by: cvs-current
Commit changes to rc and rc.local, removing the remaining minimal
functionality of rc.local into rc and commenting it out of rc.local
prior to the deletion of rc.local from the CVS tree.
-rw-r--r-- | etc/rc | 34 | ||||
-rw-r--r-- | etc/rc.conf | 3 | ||||
-rw-r--r-- | etc/rc.local | 29 |
3 files changed, 43 insertions, 23 deletions
@@ -1,5 +1,5 @@ #!/bin/sh -# $Id: rc,v 1.161 1998/12/10 08:06:59 jb Exp $ +# $Id: rc,v 1.162 1998/12/11 08:25:12 jb Exp $ # From: @(#)rc 5.27 (Berkeley) 6/5/91 # System startup script run by init on autoboot @@ -352,11 +352,39 @@ if [ "X${local_startup}" != X"NO" ]; then echo . fi +if [ "X${update_motd}" != X"NO" ]; then + T=/tmp/_motd + rm -f $T + uname -v | sed -e 's,^\([^#]*\) #\(.* [1-2][0-9][0-9][0-9]\).*/\([^\]*\) $,\1 (\3) #\2,' > $T + awk '{if (NR == 1) {if ($1 == "FreeBSD") {next} else {print "\n"$0}} else {print}}' < /etc/motd >> $T + cp $T /etc/motd + chmod 644 /etc/motd + rm -f $T +fi + # Run rc.devfs if present to customify devfs [ -f /etc/rc.devfs ] && sh /etc/rc.devfs -# Do traditional (but rather obsolete) rc.local file if it exists. -[ -f /etc/rc.local ] && sh /etc/rc.local +# Do traditional (but rather obsolete) rc.local file if it exists. If you +# use this file and want to make it programmatic, source /etc/rc.conf in +# /etc/rc.local and add your custom variables to /etc/rc.conf.local, as +# shown below. Please do not put local extensions into /etc/rc itself. +# Use /etc/rc.local +# +# ---- rc.local ---- +# if [ -f /etc/rc.conf ]; then +# . /etc/rc.conf +# fi +# +# ... additional startup conditionals ... +# ---- rc.local ---- +# + +if [ -f /etc/rc.local ]; then + echo -n 'starting local daemons:' + sh /etc/rc.local + echo '.' +fi # Raise kernel security level. This should be done only after `fsck' has # repaired local file systems if you want the securelevel to be greater than 1. diff --git a/etc/rc.conf b/etc/rc.conf index cd0a4cb..0bf9f1f 100644 --- a/etc/rc.conf +++ b/etc/rc.conf @@ -6,7 +6,7 @@ # # All arguments must be in double or single quotes. # -# $Id: rc.conf,v 1.63 1998/11/25 21:16:43 msmith Exp $ +# $Id: rc.conf,v 1.64 1998/12/01 21:36:32 dillon Exp $ ############################################################## ### Important initial Boot-time options ##################### @@ -170,6 +170,7 @@ ldconfig_paths="/usr/lib/compat /usr/X11R6/lib /usr/local/lib" # shared library ldconfig_paths_aout="/usr/lib/compat/aout /usr/X11R6/lib/aout /usr/local/lib/aout" # a.out shared library search paths kern_securelevel_enable="NO" # kernel security level (see init(8)), kern_securelevel="-1" # range: -1..2 ; `-1' is the most insecure +update_motd="YES" # update version info in /etc/motd (or NO) ############################################################## ### Allow local configuration override at the very end here ## diff --git a/etc/rc.local b/etc/rc.local index 5e65844..9a57061 100644 --- a/etc/rc.local +++ b/etc/rc.local @@ -1,24 +1,15 @@ # # site-specific startup actions, daemons # -# $Id: rc.local,v 1.24 1997/06/25 12:17:17 ache Exp $ +# $Id: rc.local,v 1.25 1997/06/25 15:15:13 ache Exp $ # +# put your local stuff here or in /usr/local/etc/rc.d. If you put stuff +# here and want to make it programmer, bring in /etc/rc.conf and add +# your custom variables to /etc/rc.conf.local +# +# if [ -f /etc/rc.conf ]; then +# . /etc/rc.conf +# fi +# +# ... additional startup conditionals ... -# If there is a global system configuration file, suck it in. -#if [ -f /etc/rc.conf ]; then -# . /etc/rc.conf -#fi - -T=/tmp/_motd -rm -f $T -uname -v | sed -e 's,^\([^#]*\) #\(.* [1-2][0-9][0-9][0-9]\).*/\([^\]*\) $,\1 (\3) #\2,' > $T -awk '{if (NR == 1) {if ($1 == "FreeBSD") {next} else {print "\n"$0}} else {print}}' < /etc/motd >> $T -cp $T /etc/motd -chmod 644 /etc/motd -rm -f $T - -echo -n 'starting local daemons:' - -# put your local stuff here - -echo '.' |