Index: etc/rc =================================================================== RCS file: /cvsroot/src/etc/rc,v retrieving revision 1.162 diff -u -r1.162 rc --- etc/rc 4 Jan 2003 15:27:43 -0000 1.162 +++ etc/rc 12 Oct 2004 20:19:54 -0000 @@ -35,7 +35,16 @@ trap : INT trap "echo 'Boot interrupted.'; exit 1" QUIT -date +if [ -f /etc/release ]; then + version=$(head -n 1 /etc/release) + echo "===> Starting ${version}..." +fi + +if checkyesno rc_use_comments; then + echo "${rc_msg_prefix}Boot started at $(date)." +else + date +fi files=$(rcorder -s nostart ${rc_rcorder_flags} /etc/rc.d/*) @@ -43,5 +52,9 @@ run_rc_script $_rc_elem start done -date +if checkyesno rc_use_comments; then + echo "${rc_msg_prefix}Boot finished at $(date)." +else + date +fi exit 0 Index: etc/rc.local =================================================================== RCS file: /cvsroot/src/etc/rc.local,v retrieving revision 1.30 diff -u -r1.30 rc.local --- etc/rc.local 23 Jul 2002 10:48:01 -0000 1.30 +++ etc/rc.local 12 Oct 2004 20:19:54 -0000 @@ -10,7 +10,9 @@ # An alternative option is to create site-specific /etc/rc.d scripts. # -echo -n 'Starting local daemons:' +$_rc_subr_loaded . /etc/rc.subr + +echo -n "${rc_msg_prefix}Starting local daemons:" # Add your local daemons here. # Index: etc/rc.subr =================================================================== RCS file: /cvsroot/src/etc/rc.subr,v retrieving revision 1.65 diff -u -r1.65 rc.subr --- etc/rc.subr 12 Oct 2004 14:45:29 -0000 1.65 +++ etc/rc.subr 12 Oct 2004 20:19:54 -0000 @@ -263,6 +263,9 @@ # ---- ------ ------- # name y Name of script. # +# comment y Short description of the service being handled, +# if any. +# # command n Full path to command. # Not needed if ${rc_arg}_cmd is set for # each keyword. @@ -550,7 +553,13 @@ # setup the command to run, and run it # - echo "Starting ${name}." + if checkyesno rc_use_comments && [ -n "${comment}" ] + then + echo "${rc_msg_prefix}Starting ${comment}" \ + "(${name})." + else + echo "${rc_msg_prefix}Starting ${name}." + fi if [ -n "$_chroot" ]; then _doit="\ ${_nice:+nice -n $_nice }\ @@ -600,7 +609,13 @@ # send the signal to stop # - echo "Stopping ${name}." + if checkyesno rc_use_comments && [ -n "${comment}" ] + then + echo "${rc_msg_prefix}Stopping ${comment}" \ + "(${name})." + else + echo "${rc_msg_prefix}Stopping ${name}." + fi _doit="kill -${sig_stop:-TERM} $rc_pid" if [ -n "$_user" ]; then _doit="su -m $_user -c 'sh -c \"$_doit\"'" @@ -629,7 +644,14 @@ fi exit 1 fi - echo "Reloading ${name} config files." + if checkyesno rc_use_comments && [ -n "${comment}" ] + then + echo "${rc_msg_prefix}Reloading ${comment}" \ + "(${name}) config files." + else + echo "${rc_msg_prefix}Reloading ${name}" \ + "config files." + fi if ! eval $_precmd && [ -z "$rc_force" ]; then return 1 fi Index: etc/defaults/rc.conf =================================================================== RCS file: /cvsroot/src/etc/defaults/rc.conf,v retrieving revision 1.63 diff -u -r1.63 rc.conf --- etc/defaults/rc.conf 9 Oct 2004 02:18:48 -0000 1.63 +++ etc/defaults/rc.conf 12 Oct 2004 20:19:58 -0000 @@ -45,6 +45,12 @@ # rcshutdown_timeout="" +# String prepended to messages printed by rc.d scripts. +rc_msg_prefix="=> " + +# Wether to use verbose comments or daemon names. +rc_use_comments=YES + # Basic network configuration # Index: etc/rc.d/accounting =================================================================== RCS file: /cvsroot/src/etc/rc.d/accounting,v retrieving revision 1.8 diff -u -r1.8 accounting --- etc/rc.d/accounting 13 Aug 2004 18:08:03 -0000 1.8 +++ etc/rc.d/accounting 12 Oct 2004 20:19:58 -0000 @@ -18,17 +18,17 @@ accounting_start() { + echo "${rc_msg_prefix}Turning on accounting." if [ ! -f ${accounting_file} ]; then echo "Creating accounting file ${accounting_file}" ( umask 022 ; > ${accounting_file} ) fi - echo "Turning on accounting." ${accounting_command} ${accounting_file} } accounting_stop() { - echo "Turning off accounting." + echo "${rc_msg_prefix}Turning off accounting." ${accounting_command} } Index: etc/rc.d/altqd =================================================================== RCS file: /cvsroot/src/etc/rc.d/altqd,v retrieving revision 1.4 diff -u -r1.4 altqd --- etc/rc.d/altqd 13 Aug 2004 18:08:03 -0000 1.4 +++ etc/rc.d/altqd 12 Oct 2004 20:19:58 -0000 @@ -11,6 +11,7 @@ $_rc_subr_loaded . /etc/rc.subr name="altqd" +comment="ALTQ daemon" rcvar=$name command="/usr/sbin/${name}" pidfile="/var/run/${name}.pid" Index: etc/rc.d/amd =================================================================== RCS file: /cvsroot/src/etc/rc.d/amd,v retrieving revision 1.13 diff -u -r1.13 amd --- etc/rc.d/amd 12 Oct 2004 14:51:03 -0000 1.13 +++ etc/rc.d/amd 12 Oct 2004 20:19:58 -0000 @@ -10,6 +10,7 @@ $_rc_subr_loaded . /etc/rc.subr name="amd" +comment="auto mounter daemon" rcvar=$name command="/usr/sbin/${name}" reload_cmd="/usr/sbin/amq -f" Index: etc/rc.d/apmd =================================================================== RCS file: /cvsroot/src/etc/rc.d/apmd,v retrieving revision 1.6 diff -u -r1.6 apmd --- etc/rc.d/apmd 13 Aug 2004 18:08:03 -0000 1.6 +++ etc/rc.d/apmd 12 Oct 2004 20:19:58 -0000 @@ -10,6 +10,7 @@ $_rc_subr_loaded . /etc/rc.subr name="apmd" +comment="advanced power management monitor" rcvar=$name command="/usr/sbin/${name}" Index: etc/rc.d/bootparams =================================================================== RCS file: /cvsroot/src/etc/rc.d/bootparams,v retrieving revision 1.7 diff -u -r1.7 bootparams --- etc/rc.d/bootparams 13 Aug 2004 18:08:03 -0000 1.7 +++ etc/rc.d/bootparams 12 Oct 2004 20:19:58 -0000 @@ -10,6 +10,7 @@ $_rc_subr_loaded . /etc/rc.subr name="bootparamd" +comment="boot parameter server" rcvar=$name command="/usr/sbin/rpc.${name}" required_files="/etc/bootparams" Index: etc/rc.d/ccd =================================================================== RCS file: /cvsroot/src/etc/rc.d/ccd,v retrieving revision 1.5 diff -u -r1.5 ccd --- etc/rc.d/ccd 13 Aug 2004 18:08:03 -0000 1.5 +++ etc/rc.d/ccd 12 Oct 2004 20:19:58 -0000 @@ -15,7 +15,7 @@ ccd_start() { if [ -f /etc/ccd.conf ]; then - echo "Configuring CCD devices." + echo "${rc_msg_prefix}Configuring CCD devices." ccdconfig -C fi } Index: etc/rc.d/cgd =================================================================== RCS file: /cvsroot/src/etc/rc.d/cgd,v retrieving revision 1.3 diff -u -r1.3 cgd --- etc/rc.d/cgd 13 Aug 2004 18:08:03 -0000 1.3 +++ etc/rc.d/cgd 12 Oct 2004 20:19:58 -0000 @@ -15,7 +15,7 @@ cgd_start() { if [ -f /etc/cgd/cgd.conf ]; then - echo "Configuring CGD devices." + echo "${rc_msg_prefix}Configuring CGD devices." cgdconfig -C fi } Index: etc/rc.d/cleartmp =================================================================== RCS file: /cvsroot/src/etc/rc.d/cleartmp,v retrieving revision 1.5 diff -u -r1.5 cleartmp --- etc/rc.d/cleartmp 13 Aug 2004 18:08:03 -0000 1.5 +++ etc/rc.d/cleartmp 12 Oct 2004 20:19:58 -0000 @@ -16,7 +16,7 @@ cleartmp_start() { - echo "Clearing /tmp." + echo "${rc_msg_prefix}Clearing /tmp." # # Prune quickly with one rm, then use find to clean up # /tmp/[lq]* (this is not needed with mfs /tmp, but Index: etc/rc.d/cron =================================================================== RCS file: /cvsroot/src/etc/rc.d/cron,v retrieving revision 1.6 diff -u -r1.6 cron --- etc/rc.d/cron 13 Aug 2004 18:08:03 -0000 1.6 +++ etc/rc.d/cron 12 Oct 2004 20:19:58 -0000 @@ -10,6 +10,7 @@ $_rc_subr_loaded . /etc/rc.subr name="cron" +comment="periodic command scheduler" rcvar=$name command="/usr/sbin/${name}" pidfile="/var/run/${name}.pid" Index: etc/rc.d/dhclient =================================================================== RCS file: /cvsroot/src/etc/rc.d/dhclient,v retrieving revision 1.9 diff -u -r1.9 dhclient --- etc/rc.d/dhclient 13 Aug 2004 18:08:03 -0000 1.9 +++ etc/rc.d/dhclient 12 Oct 2004 20:19:58 -0000 @@ -14,6 +14,7 @@ $_rc_subr_loaded . /etc/rc.subr name="dhclient" +comment="DHCP client" rcvar=$name command="/sbin/${name}" pidfile="/var/run/${name}.pid" Index: etc/rc.d/dhcpd =================================================================== RCS file: /cvsroot/src/etc/rc.d/dhcpd,v retrieving revision 1.6 diff -u -r1.6 dhcpd --- etc/rc.d/dhcpd 13 Aug 2004 18:08:03 -0000 1.6 +++ etc/rc.d/dhcpd 12 Oct 2004 20:19:58 -0000 @@ -10,6 +10,7 @@ $_rc_subr_loaded . /etc/rc.subr name="dhcpd" +comment="DHCP daemon" rcvar=$name command="/usr/sbin/${name}" pidfile="/var/run/${name}.pid" Index: etc/rc.d/dhcrelay =================================================================== RCS file: /cvsroot/src/etc/rc.d/dhcrelay,v retrieving revision 1.6 diff -u -r1.6 dhcrelay --- etc/rc.d/dhcrelay 13 Aug 2004 18:08:03 -0000 1.6 +++ etc/rc.d/dhcrelay 12 Oct 2004 20:19:58 -0000 @@ -10,6 +10,7 @@ $_rc_subr_loaded . /etc/rc.subr name="dhcrelay" +comment="DHCP relay agent" rcvar=$name command="/usr/sbin/${name}" pidfile="/var/run/${name}.pid" Index: etc/rc.d/downinterfaces =================================================================== RCS file: /cvsroot/src/etc/rc.d/downinterfaces,v retrieving revision 1.5 diff -u -r1.5 downinterfaces --- etc/rc.d/downinterfaces 11 Oct 2004 15:00:51 -0000 1.5 +++ etc/rc.d/downinterfaces 12 Oct 2004 20:19:58 -0000 @@ -22,7 +22,7 @@ if [ "$iflist" != "" ] && [ "$iflist" != " " ] then - echo "Shutting down interfaces:$iflist" + echo "${rc_msg_prefix}Shutting down interfaces:$iflist" for int in $iflist; do ifconfig $int down done Index: etc/rc.d/fixsb =================================================================== RCS file: /cvsroot/src/etc/rc.d/fixsb,v retrieving revision 1.11 diff -u -r1.11 fixsb --- etc/rc.d/fixsb 13 Aug 2004 18:08:03 -0000 1.11 +++ etc/rc.d/fixsb 12 Oct 2004 20:19:58 -0000 @@ -175,13 +175,14 @@ fsck_start() { if [ -e /fastboot ]; then - echo "Fast boot: skipping disk checks." + echo "${rc_msg_prefix}Fast boot: skipping disk checks." else # During fsck ignore SIGQUIT trap : 3 okfs=true - echo -n "Checking for botched superblock upgrades:" + echo -n "${rc_msg_prefix}Checking for botched superblock" \ + "upgrades:" for p in $(parse_fstab); do if check_part "$p"; then if $okfs; then Index: etc/rc.d/fsck =================================================================== RCS file: /cvsroot/src/etc/rc.d/fsck,v retrieving revision 1.5 diff -u -r1.5 fsck --- etc/rc.d/fsck 13 Aug 2004 18:08:03 -0000 1.5 +++ etc/rc.d/fsck 12 Oct 2004 20:19:58 -0000 @@ -26,12 +26,12 @@ fsck_start() { if [ -e /fastboot ]; then - echo "Fast boot: skipping disk checks." + echo "${rc_msg_prefix}Fast boot: skipping disk checks." else # During fsck ignore SIGQUIT trap : 3 - echo "Starting file system checks:" + echo "${rc_msg_prefix}Starting file system checks:" fsck $fsck_flags case $? in 0) Index: etc/rc.d/identd =================================================================== RCS file: /cvsroot/src/etc/rc.d/identd,v retrieving revision 1.2 diff -u -r1.2 identd --- etc/rc.d/identd 13 Aug 2004 18:08:03 -0000 1.2 +++ etc/rc.d/identd 12 Oct 2004 20:19:58 -0000 @@ -10,6 +10,7 @@ $_rc_subr_loaded . /etc/rc.subr name="identd" +comment="TCP/IP Ident protocol server" rcvar=$name command="/usr/libexec/${name}" Index: etc/rc.d/ifwatchd =================================================================== RCS file: /cvsroot/src/etc/rc.d/ifwatchd,v retrieving revision 1.4 diff -u -r1.4 ifwatchd --- etc/rc.d/ifwatchd 13 Aug 2004 18:08:03 -0000 1.4 +++ etc/rc.d/ifwatchd 12 Oct 2004 20:19:58 -0000 @@ -10,6 +10,7 @@ $_rc_subr_loaded . /etc/rc.subr name="ifwatchd" +comment="interface address change monitor" rcvar=$name command="/usr/sbin/${name}" Index: etc/rc.d/inetd =================================================================== RCS file: /cvsroot/src/etc/rc.d/inetd,v retrieving revision 1.7 diff -u -r1.7 inetd --- etc/rc.d/inetd 13 Aug 2004 18:08:03 -0000 1.7 +++ etc/rc.d/inetd 12 Oct 2004 20:19:58 -0000 @@ -10,6 +10,7 @@ $_rc_subr_loaded . /etc/rc.subr name="inetd" +comment="Internet superserver" rcvar=$name command="/usr/sbin/${name}" pidfile="/var/run/${name}.pid" Index: etc/rc.d/ipfilter =================================================================== RCS file: /cvsroot/src/etc/rc.d/ipfilter,v retrieving revision 1.12 diff -u -r1.12 ipfilter --- etc/rc.d/ipfilter 9 Sep 2004 00:33:03 -0000 1.12 +++ etc/rc.d/ipfilter 12 Oct 2004 20:19:58 -0000 @@ -42,7 +42,7 @@ ipfilter_start() { - echo "Enabling ipfilter." + echo "${rc_msg_prefix}Enabling ipfilter." /sbin/ipf -E -Fa if [ -f /etc/ipf.conf ]; then /sbin/ipf -Fa -f /etc/ipf.conf @@ -54,13 +54,13 @@ ipfilter_stop() { - echo "Disabling ipfilter." + echo "${rc_msg_prefix}Disabling ipfilter." /sbin/ipf -D } ipfilter_reload() { - echo "Reloading ipfilter rules." + echo "${rc_msg_prefix}Reloading ipfilter rules." if [ -f /etc/ipf.conf ] && ! /sbin/ipf -I -Fa -f /etc/ipf.conf; then err 1 "reload of ipf.conf failed; not swapping to new ruleset." Index: etc/rc.d/ipmon =================================================================== RCS file: /cvsroot/src/etc/rc.d/ipmon,v retrieving revision 1.12 diff -u -r1.12 ipmon --- etc/rc.d/ipmon 13 Aug 2004 18:08:03 -0000 1.12 +++ etc/rc.d/ipmon 12 Oct 2004 20:19:58 -0000 @@ -10,6 +10,7 @@ $_rc_subr_loaded . /etc/rc.subr name="ipmon" +comment="packet filter monitor" rcvar=$name command="/usr/sbin/${name}" pidfile="/var/run/${name}.pid" Index: etc/rc.d/ipnat =================================================================== RCS file: /cvsroot/src/etc/rc.d/ipnat,v retrieving revision 1.13 diff -u -r1.13 ipnat --- etc/rc.d/ipnat 12 Oct 2004 14:51:03 -0000 1.13 +++ etc/rc.d/ipnat 12 Oct 2004 20:19:58 -0000 @@ -28,10 +28,10 @@ "WARNING: net.inet.ip.forwarding is 0" fi if ! checkyesno ipfilter || [ ! -f /etc/ipf.conf ]; then - echo "Enabling ipfilter for NAT." + echo "${rc_msg_prefix}Enabling ipfilter for NAT." /sbin/ipf -E -Fa fi - echo -n "Installing NAT rules ... " + echo -n "${rc_msg_prefix}Installing NAT rules: " /usr/sbin/ipnat -F -f ${config} } Index: etc/rc.d/ipsec =================================================================== RCS file: /cvsroot/src/etc/rc.d/ipsec,v retrieving revision 1.8 diff -u -r1.8 ipsec --- etc/rc.d/ipsec 13 Aug 2004 18:08:03 -0000 1.8 +++ etc/rc.d/ipsec 12 Oct 2004 20:19:58 -0000 @@ -40,13 +40,13 @@ ipsec_start() { - echo "Installing ipsec manual keys/policies." + echo "${rc_msg_prefix}Installing ipsec manual keys/policies." /sbin/setkey -f /etc/ipsec.conf } ipsec_stop() { - echo "Clearing ipsec manual keys/policies." + echo "${rc_msg_prefix}Clearing ipsec manual keys/policies." # still not 100% sure if we would like to do this. # it is very questionable to do this during shutdown session, since @@ -58,7 +58,7 @@ ipsec_reload() { - echo "Reloading ipsec manual keys/policies." + echo "${rc_msg_prefix}Reloading ipsec manual keys/policies." /sbin/setkey -F /sbin/setkey -FP /sbin/setkey -f /etc/ipsec.conf Index: etc/rc.d/isdnd =================================================================== RCS file: /cvsroot/src/etc/rc.d/isdnd,v retrieving revision 1.10 diff -u -r1.10 isdnd --- etc/rc.d/isdnd 13 Aug 2004 18:08:03 -0000 1.10 +++ etc/rc.d/isdnd 12 Oct 2004 20:19:58 -0000 @@ -14,6 +14,7 @@ $_rc_subr_loaded . /etc/rc.subr name="isdnd" +comment="ISDN connection management daemon" rcvar=$name required_files="/etc/isdn/${name}.rc" Index: etc/rc.d/kdc =================================================================== RCS file: /cvsroot/src/etc/rc.d/kdc,v retrieving revision 1.6 diff -u -r1.6 kdc --- etc/rc.d/kdc 13 Aug 2004 18:08:03 -0000 1.6 +++ etc/rc.d/kdc 12 Oct 2004 20:19:58 -0000 @@ -10,6 +10,7 @@ $_rc_subr_loaded . /etc/rc.subr name="kdc" +comment="Kerberos 5 server" rcvar=$name command="/usr/sbin/${name}" pidfile="/var/run/${name}.pid" Index: etc/rc.d/ldconfig =================================================================== RCS file: /cvsroot/src/etc/rc.d/ldconfig,v retrieving revision 1.8 diff -u -r1.8 ldconfig --- etc/rc.d/ldconfig 13 Aug 2004 18:08:03 -0000 1.8 +++ etc/rc.d/ldconfig 12 Oct 2004 20:19:58 -0000 @@ -18,7 +18,8 @@ ldconfig_start() { if [ -f ${ldconfig_command} ]; then - echo "Creating a.out runtime link editor directory cache." + echo "${rc_msg_prefix}Creating a.out runtime link editor" \ + "directory cache." ${ldconfig_command} ${rc_flags} fi } Index: etc/rc.d/lpd =================================================================== RCS file: /cvsroot/src/etc/rc.d/lpd,v retrieving revision 1.6 diff -u -r1.6 lpd --- etc/rc.d/lpd 13 Aug 2004 18:08:03 -0000 1.6 +++ etc/rc.d/lpd 12 Oct 2004 20:19:58 -0000 @@ -10,6 +10,7 @@ $_rc_subr_loaded . /etc/rc.subr name="lpd" +comment="line printer spooler" rcvar=$name command="/usr/sbin/${name}" pidfile="/var/run/${name}.pid" Index: etc/rc.d/mixerctl =================================================================== RCS file: /cvsroot/src/etc/rc.d/mixerctl,v retrieving revision 1.9 diff -u -r1.9 mixerctl --- etc/rc.d/mixerctl 11 Oct 2004 15:00:51 -0000 1.9 +++ etc/rc.d/mixerctl 12 Oct 2004 20:19:58 -0000 @@ -17,7 +17,7 @@ mixerctl_start() { if [ -n "$mixerctl_mixers" ]; then - echo -n "Restoring mixer settings:" + echo -n "${rc_msg_prefix}Restoring mixer settings:" for mix in $mixerctl_mixers; do if [ -s /var/db/${mix}.conf ]; then echo -n " $mix" @@ -28,7 +28,7 @@ echo "." fi if [ -r /etc/mixerctl.conf ]; then - echo "Setting mixerctl variables..." + echo "${rc_msg_prefix}Setting mixerctl variables." while read setting; do [ -z "$setting" ] || /usr/bin/mixerctl -n -w $setting done < /etc/mixerctl.conf @@ -38,7 +38,7 @@ mixerctl_stop() { if [ -n "$mixerctl_mixers" ]; then - echo -n "Saving mixer settings:" + echo -n "${rc_msg_prefix}Saving mixer settings:" for mix in $mixerctl_mixers; do echo -n " $mix" /usr/bin/mixerctl -d /dev/$mix -a > /var/db/${mix}.conf Index: etc/rc.d/mopd =================================================================== RCS file: /cvsroot/src/etc/rc.d/mopd,v retrieving revision 1.6 diff -u -r1.6 mopd --- etc/rc.d/mopd 13 Aug 2004 18:08:03 -0000 1.6 +++ etc/rc.d/mopd 12 Oct 2004 20:19:58 -0000 @@ -10,6 +10,7 @@ $_rc_subr_loaded . /etc/rc.subr name="mopd" +comment="MOP loader daemon" rcvar=$name command="/usr/sbin/${name}" Index: etc/rc.d/motd =================================================================== RCS file: /cvsroot/src/etc/rc.d/motd,v retrieving revision 1.9 diff -u -r1.9 motd --- etc/rc.d/motd 13 Aug 2004 18:08:03 -0000 1.9 +++ etc/rc.d/motd 12 Oct 2004 20:19:58 -0000 @@ -20,7 +20,7 @@ # Must be done *before* interactive logins are possible # to prevent possible race conditions. # - echo "Updating motd." + echo "${rc_msg_prefix}Updating message of the day (motd)." if [ ! -f /etc/motd ]; then install -c -o root -g wheel -m 664 /dev/null /etc/motd fi Index: etc/rc.d/mountall =================================================================== RCS file: /cvsroot/src/etc/rc.d/mountall,v retrieving revision 1.4 diff -u -r1.4 mountall --- etc/rc.d/mountall 13 Aug 2004 18:08:03 -0000 1.4 +++ etc/rc.d/mountall 12 Oct 2004 20:19:58 -0000 @@ -9,8 +9,8 @@ $_rc_subr_loaded . /etc/rc.subr name="mountall" -start_cmd="echo 'Mounting all filesystems...'; mount -a" -stop_cmd="echo 'Unmounting all filesystems...'; umount -a" +start_cmd="echo '${rc_msg_prefix}Mounting all filesystems.'; mount -a" +stop_cmd="echo '${rc_msg_prefix}Unmounting all filesystems.'; umount -a" load_rc_config $name run_rc_command "$1" Index: etc/rc.d/mountd =================================================================== RCS file: /cvsroot/src/etc/rc.d/mountd,v retrieving revision 1.12 diff -u -r1.12 mountd --- etc/rc.d/mountd 13 Aug 2004 18:08:03 -0000 1.12 +++ etc/rc.d/mountd 12 Oct 2004 20:19:58 -0000 @@ -9,6 +9,7 @@ $_rc_subr_loaded . /etc/rc.subr name="mountd" +comment="NFS mount request server" rcvar=$name command="/usr/sbin/${name}" required_files="/etc/exports" Index: etc/rc.d/moused =================================================================== RCS file: /cvsroot/src/etc/rc.d/moused,v retrieving revision 1.2 diff -u -r1.2 moused --- etc/rc.d/moused 13 Aug 2004 18:08:03 -0000 1.2 +++ etc/rc.d/moused 12 Oct 2004 20:19:58 -0000 @@ -9,6 +9,7 @@ $_rc_subr_loaded . /etc/rc.subr name="moused" +comment="serial mouse daemon" rcvar=$name command="/usr/sbin/${name}" Index: etc/rc.d/mrouted =================================================================== RCS file: /cvsroot/src/etc/rc.d/mrouted,v retrieving revision 1.7 diff -u -r1.7 mrouted --- etc/rc.d/mrouted 13 Aug 2004 18:08:03 -0000 1.7 +++ etc/rc.d/mrouted 12 Oct 2004 20:19:58 -0000 @@ -10,6 +10,7 @@ $_rc_subr_loaded . /etc/rc.subr name="mrouted" +comment="IP multicast routing daemon" rcvar=$name command="/usr/sbin/${name}" pidfile="/var/run/${name}.pid" Index: etc/rc.d/named =================================================================== RCS file: /cvsroot/src/etc/rc.d/named,v retrieving revision 1.14 diff -u -r1.14 named --- etc/rc.d/named 13 Aug 2004 18:08:03 -0000 1.14 +++ etc/rc.d/named 12 Oct 2004 20:20:06 -0000 @@ -11,6 +11,7 @@ $_rc_subr_loaded . /etc/rc.subr name="named" +comment="Internet domain name server" rcvar=$name command="/usr/sbin/${name}" pidfile="/var/run/${name}.pid" Index: etc/rc.d/ndbootd =================================================================== RCS file: /cvsroot/src/etc/rc.d/ndbootd,v retrieving revision 1.2 diff -u -r1.2 ndbootd --- etc/rc.d/ndbootd 13 Aug 2004 18:08:03 -0000 1.2 +++ etc/rc.d/ndbootd 12 Oct 2004 20:20:06 -0000 @@ -9,6 +9,7 @@ $_rc_subr_loaded . /etc/rc.subr name="ndbootd" +comment="Sun Network Disk protocol server" rcvar=$name command="/usr/sbin/${name}" pidfile="/var/run/${name}.pid" Index: etc/rc.d/network =================================================================== RCS file: /cvsroot/src/etc/rc.d/network,v retrieving revision 1.47 diff -u -r1.47 network --- etc/rc.d/network 12 Oct 2004 14:51:03 -0000 1.47 +++ etc/rc.d/network 12 Oct 2004 20:20:06 -0000 @@ -17,7 +17,7 @@ { # set hostname, turn on network # - echo "Starting network." + echo "${rc_msg_prefix}Starting network." # If $hostname is set, use it for my Internet name, # otherwise use /etc/myname @@ -341,7 +341,7 @@ network_stop() { - echo "Stopping network." + echo "${rc_msg_prefix}Stopping network." # XXX this must die if [ -s /etc/netstart.local ]; then Index: etc/rc.d/newsyslog =================================================================== RCS file: /cvsroot/src/etc/rc.d/newsyslog,v retrieving revision 1.6 diff -u -r1.6 newsyslog --- etc/rc.d/newsyslog 13 Aug 2004 18:08:03 -0000 1.6 +++ etc/rc.d/newsyslog 12 Oct 2004 20:20:06 -0000 @@ -17,7 +17,7 @@ newsyslog_start() { - echo -n "Trimming log files:" + echo -n "${rc_msg_prefix}Trimming log files:" /usr/bin/newsyslog -s $rc_flags echo " done." } Index: etc/rc.d/nfsd =================================================================== RCS file: /cvsroot/src/etc/rc.d/nfsd,v retrieving revision 1.7 diff -u -r1.7 nfsd --- etc/rc.d/nfsd 12 Oct 2004 14:51:03 -0000 1.7 +++ etc/rc.d/nfsd 12 Oct 2004 20:20:06 -0000 @@ -9,6 +9,7 @@ $_rc_subr_loaded . /etc/rc.subr name="nfsd" +comment="NFS server" rcvar="nfs_server" command="/usr/sbin/${name}" required_vars="mountd rpcbind" Index: etc/rc.d/nfslocking =================================================================== RCS file: /cvsroot/src/etc/rc.d/nfslocking,v retrieving revision 1.8 diff -u -r1.8 nfslocking --- etc/rc.d/nfslocking 12 Oct 2004 14:51:03 -0000 1.8 +++ etc/rc.d/nfslocking 12 Oct 2004 20:20:06 -0000 @@ -17,6 +17,7 @@ } name="statd" +comment="host status monitoring daemon" rcvar=$name command="/usr/sbin/rpc.${name}" start_precmd='nfslocking_precmd' @@ -27,6 +28,7 @@ run_rc_command "$arg" name="lockd" +comment="NFS file locking daemon" rcvar=$name command="/usr/sbin/rpc.${name}" start_precmd='nfslocking_precmd' Index: etc/rc.d/ntpd =================================================================== RCS file: /cvsroot/src/etc/rc.d/ntpd,v retrieving revision 1.13 diff -u -r1.13 ntpd --- etc/rc.d/ntpd 13 Aug 2004 18:08:03 -0000 1.13 +++ etc/rc.d/ntpd 12 Oct 2004 20:20:06 -0000 @@ -11,6 +11,7 @@ $_rc_subr_loaded . /etc/rc.subr name="ntpd" +comment="Network Time Protocol daemon" rcvar=$name command="/usr/sbin/${name}" pidfile="/var/run/${name}.pid" Index: etc/rc.d/ntpdate =================================================================== RCS file: /cvsroot/src/etc/rc.d/ntpdate,v retrieving revision 1.17 diff -u -r1.17 ntpdate --- etc/rc.d/ntpdate 11 Oct 2004 15:00:51 -0000 1.17 +++ etc/rc.d/ntpdate 12 Oct 2004 20:20:06 -0000 @@ -27,7 +27,7 @@ ' /dev/null; then Index: etc/rc.d/sysctl =================================================================== RCS file: /cvsroot/src/etc/rc.d/sysctl,v retrieving revision 1.13 diff -u -r1.13 sysctl --- etc/rc.d/sysctl 13 Aug 2004 18:08:03 -0000 1.13 +++ etc/rc.d/sysctl 12 Oct 2004 20:20:06 -0000 @@ -16,7 +16,7 @@ sysctl_start() { if [ -r /etc/sysctl.conf ]; then - echo "Setting sysctl variables:" + echo "${rc_msg_prefix}Setting sysctl variables." sysctl -f /etc/sysctl.conf fi } Index: etc/rc.d/sysdb =================================================================== RCS file: /cvsroot/src/etc/rc.d/sysdb,v retrieving revision 1.15 diff -u -r1.15 sysdb --- etc/rc.d/sysdb 12 Oct 2004 13:23:44 -0000 1.15 +++ etc/rc.d/sysdb 12 Oct 2004 20:20:07 -0000 @@ -18,7 +18,7 @@ sysdb_start() { - echo "Building databases..." + echo "${rc_msg_prefix}Building system databases." $devdb_cmd $utmp_cmd } Index: etc/rc.d/syslogd =================================================================== RCS file: /cvsroot/src/etc/rc.d/syslogd,v retrieving revision 1.15 diff -u -r1.15 syslogd --- etc/rc.d/syslogd 11 Oct 2004 13:29:52 -0000 1.15 +++ etc/rc.d/syslogd 12 Oct 2004 20:20:07 -0000 @@ -10,6 +10,7 @@ $_rc_subr_loaded . /etc/rc.subr name="syslogd" +comment="system logger daemon" rcvar=$name command="/usr/sbin/${name}" pidfile="/var/run/${name}.pid" Index: etc/rc.d/timed =================================================================== RCS file: /cvsroot/src/etc/rc.d/timed,v retrieving revision 1.6 diff -u -r1.6 timed --- etc/rc.d/timed 13 Aug 2004 18:08:03 -0000 1.6 +++ etc/rc.d/timed 12 Oct 2004 20:20:07 -0000 @@ -10,6 +10,7 @@ $_rc_subr_loaded . /etc/rc.subr name="timed" +comment="time server daemon" rcvar=$name command="/usr/sbin/${name}" Index: etc/rc.d/tpctl =================================================================== RCS file: /cvsroot/src/etc/rc.d/tpctl,v retrieving revision 1.2 diff -u -r1.2 tpctl --- etc/rc.d/tpctl 13 Aug 2004 18:08:03 -0000 1.2 +++ etc/rc.d/tpctl 12 Oct 2004 20:20:07 -0000 @@ -16,7 +16,7 @@ run_tpctl() { - echo "Calibrating touch panel..." + echo "${rc_msg_prefix}Calibrating touch panel." /usr/sbin/${name} $rc_flags } Index: etc/rc.d/ttys =================================================================== RCS file: /cvsroot/src/etc/rc.d/ttys,v retrieving revision 1.5 diff -u -r1.5 ttys --- etc/rc.d/ttys 13 Aug 2004 18:08:03 -0000 1.5 +++ etc/rc.d/ttys 12 Oct 2004 20:20:07 -0000 @@ -17,7 +17,7 @@ # set flags on ttys. # (do early, in case they use tty for SLIP in network) # - echo "Setting tty flags." + echo "${rc_msg_prefix}Setting tty flags." ttyflags -a # setup ptys Index: etc/rc.d/veriexec =================================================================== RCS file: /cvsroot/src/etc/rc.d/veriexec,v retrieving revision 1.3 diff -u -r1.3 veriexec --- etc/rc.d/veriexec 13 Aug 2004 18:08:03 -0000 1.3 +++ etc/rc.d/veriexec 12 Oct 2004 20:20:07 -0000 @@ -15,7 +15,7 @@ veriexec_start() { - echo -n "Loading fingerprints..." + echo -n "${rc_msg_prefix}Loading fingerprints." /sbin/veriexecctl /etc/signatures echo " done." } Index: etc/rc.d/wdogctl =================================================================== RCS file: /cvsroot/src/etc/rc.d/wdogctl,v retrieving revision 1.2 diff -u -r1.2 wdogctl --- etc/rc.d/wdogctl 13 Aug 2004 18:08:03 -0000 1.2 +++ etc/rc.d/wdogctl 12 Oct 2004 20:20:07 -0000 @@ -24,7 +24,7 @@ if [ x"${wdogctl_flags}" = "x" ]; then warn "\${wdogctl_flags} is not set, watchdog not started" else - echo "Starting watchdog timer." + echo "${rc_msg_prefix}Starting watchdog timer." /sbin/wdogctl ${wdogctl_flags} fi } Index: etc/rc.d/wscons =================================================================== RCS file: /cvsroot/src/etc/rc.d/wscons,v retrieving revision 1.10 diff -u -r1.10 wscons --- etc/rc.d/wscons 13 Aug 2004 18:08:03 -0000 1.10 +++ etc/rc.d/wscons 12 Oct 2004 20:20:07 -0000 @@ -23,6 +23,8 @@ usage="Usage: wsconfig [-n] [-f configfile] [-font fontpgm] [-screen screenpgm]" DOIT= + echo "${rc_msg_prefix}Setting up wscons console devices." + while [ $# -gt 0 ]; do case $1 in -n) Index: etc/rc.d/wsmoused =================================================================== RCS file: /cvsroot/src/etc/rc.d/wsmoused,v retrieving revision 1.3 diff -u -r1.3 wsmoused --- etc/rc.d/wsmoused 13 Aug 2004 18:08:03 -0000 1.3 +++ etc/rc.d/wsmoused 12 Oct 2004 20:20:07 -0000 @@ -10,6 +10,7 @@ $_rc_subr_loaded . /etc/rc.subr name="wsmoused" +comment="multipurpose mouse daemon" rcvar=$name command="/usr/sbin/${name}" pidfile="/var/run/${name}.pid" Index: etc/rc.d/xdm =================================================================== RCS file: /cvsroot/src/etc/rc.d/xdm,v retrieving revision 1.8 diff -u -r1.8 xdm --- etc/rc.d/xdm 13 Aug 2004 18:08:03 -0000 1.8 +++ etc/rc.d/xdm 12 Oct 2004 20:20:07 -0000 @@ -10,6 +10,7 @@ $_rc_subr_loaded . /etc/rc.subr name="xdm" +comment="X display manager" rcvar=$name command="/usr/X11R6/bin/${name}" pidfile="/var/run/${name}.pid" Index: etc/rc.d/xfs =================================================================== RCS file: /cvsroot/src/etc/rc.d/xfs,v retrieving revision 1.8 diff -u -r1.8 xfs --- etc/rc.d/xfs 13 Aug 2004 18:08:03 -0000 1.8 +++ etc/rc.d/xfs 12 Oct 2004 20:20:07 -0000 @@ -10,6 +10,7 @@ $_rc_subr_loaded . /etc/rc.subr name="xfs" +comment="X font server" rcvar=$name command="/usr/X11R6/bin/${name}" command_args="& sleep 2" Index: etc/rc.d/ypbind =================================================================== RCS file: /cvsroot/src/etc/rc.d/ypbind,v retrieving revision 1.8 diff -u -r1.8 ypbind --- etc/rc.d/ypbind 11 Oct 2004 15:00:51 -0000 1.8 +++ etc/rc.d/ypbind 12 Oct 2004 20:20:07 -0000 @@ -10,6 +10,7 @@ $_rc_subr_loaded . /etc/rc.subr name="ypbind" +comment="binding to YP server" rcvar=$name command="/usr/sbin/${name}" start_precmd="ypbind_precmd" Index: etc/rc.d/yppasswdd =================================================================== RCS file: /cvsroot/src/etc/rc.d/yppasswdd,v retrieving revision 1.10 diff -u -r1.10 yppasswdd --- etc/rc.d/yppasswdd 12 Oct 2004 14:51:03 -0000 1.10 +++ etc/rc.d/yppasswdd 12 Oct 2004 20:20:07 -0000 @@ -10,6 +10,7 @@ $_rc_subr_loaded . /etc/rc.subr name="yppasswdd" +comment="YP password file daemon" rcvar=$name command="/usr/sbin/rpc.${name}" required_vars="rpcbind ypserv" Index: etc/rc.d/ypserv =================================================================== RCS file: /cvsroot/src/etc/rc.d/ypserv,v retrieving revision 1.8 diff -u -r1.8 ypserv --- etc/rc.d/ypserv 12 Oct 2004 14:51:03 -0000 1.8 +++ etc/rc.d/ypserv 12 Oct 2004 20:20:07 -0000 @@ -9,6 +9,7 @@ $_rc_subr_loaded . /etc/rc.subr name="ypserv" +comment="YP server daemon" rcvar=$name command="/usr/sbin/${name}" required_vars="rpcbind" Index: share/man/man5/rc.conf.5 =================================================================== RCS file: /cvsroot/src/share/man/man5/rc.conf.5,v retrieving revision 1.92 diff -u -r1.92 rc.conf.5 --- share/man/man5/rc.conf.5 22 Jul 2004 03:44:12 -0000 1.92 +++ share/man/man5/rc.conf.5 12 Oct 2004 20:20:11 -0000 @@ -32,7 +32,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd July 21, 2004 +.Dd October 12, 2004 .Dt RC.CONF 5 .Os .Sh NAME @@ -155,12 +155,29 @@ Use this at your own risk! A rogue command or script may inadvertently prevent boot to multiuser. .El +.It Sy rc_msg_prefix +A string. +This is prefixed to all important messages shown by +.Xr rc.d 8 +scripts. +Ideally, each script will print a single message prefixed by this string, +saying what it is doing. +It may also print multiple lines with details about the process, though +these will not be prefixed. .It Sy rc_rcorder_flags A string. Extra arguments to the .Xr rcorder 8 run by .Pa /etc/rc . +.It Sy rc_use_comments +.Sq YES +or +.Sq NO . +If not set to +.Sq YES , +messages shown by scripts will be more compact, saying only the name +of the service being handled. .El .Ss Basic network configuration .Bl -tag -width net_interfaces Index: share/man/man8/rc.subr.8 =================================================================== RCS file: /cvsroot/src/share/man/man8/rc.subr.8,v retrieving revision 1.16 diff -u -r1.16 rc.subr.8 --- share/man/man8/rc.subr.8 12 Oct 2004 14:45:29 -0000 1.16 +++ share/man/man8/rc.subr.8 12 Oct 2004 20:20:12 -0000 @@ -363,6 +363,16 @@ .It Sy name The name of this script. This is not optional. +.It Sy comment +A comment associated with the script, used to give a better idea about +the service being handled. +It is used in +.Sq Starting , +.Sq Stopping +and +.Sq Reloading +messages, so make sure that the overall sentences are grammatically correct. +This is optional. .It Sy rcvar The value of .Sy rcvar