diff options
author | mtm <mtm@FreeBSD.org> | 2008-06-23 04:46:54 +0000 |
---|---|---|
committer | mtm <mtm@FreeBSD.org> | 2008-06-23 04:46:54 +0000 |
commit | a12ffbbd8b36c6672bd6c89e5a538d2678caa9aa (patch) | |
tree | bc1266247fd858c69b6e861ee154d01d8f866893 /etc | |
parent | ab11d78bfd2622cce4e516f6384f6ac9d92cae9a (diff) | |
download | FreeBSD-src-a12ffbbd8b36c6672bd6c89e5a538d2678caa9aa.zip FreeBSD-src-a12ffbbd8b36c6672bd6c89e5a538d2678caa9aa.tar.gz |
Move a lot of diagnostic output behind $rc_quiet in scripts that
implement their own start command.
Diffstat (limited to 'etc')
-rw-r--r-- | etc/rc.d/bgfsck | 2 | ||||
-rwxr-xr-x | etc/rc.d/fsck | 2 | ||||
-rw-r--r-- | etc/rc.d/hostid | 6 | ||||
-rw-r--r-- | etc/rc.d/hostname | 2 | ||||
-rwxr-xr-x | etc/rc.d/ldconfig | 8 | ||||
-rwxr-xr-x | etc/rc.d/motd | 6 | ||||
-rw-r--r-- | etc/rc.d/moused | 4 | ||||
-rwxr-xr-x | etc/rc.d/newsyslog | 4 | ||||
-rwxr-xr-x | etc/rc.d/savecore | 2 |
9 files changed, 19 insertions, 17 deletions
diff --git a/etc/rc.d/bgfsck b/etc/rc.d/bgfsck index 19ffb71..04c4cb5 100644 --- a/etc/rc.d/bgfsck +++ b/etc/rc.d/bgfsck @@ -31,7 +31,7 @@ bgfsck_start () bgfsck_msg="${bgfsck_msg} in ${background_fsck_delay} seconds" fi if [ -z "${rc_force}" ]; then - echo "${bgfsck_msg}." + [ -z "${rc_quiet}" ] && echo "${bgfsck_msg}." fi (sleep ${background_fsck_delay}; nice -4 fsck -B -p) 2>&1 | \ diff --git a/etc/rc.d/fsck b/etc/rc.d/fsck index 66fb26c..bf51089 100755 --- a/etc/rc.d/fsck +++ b/etc/rc.d/fsck @@ -23,7 +23,7 @@ fsck_start() # During fsck ignore SIGQUIT trap : 3 - echo "Starting file system checks:" + [ -z "${rc_quiet}" ] && echo "Starting file system checks:" if checkyesno background_fsck; then fsck -F -p else diff --git a/etc/rc.d/hostid b/etc/rc.d/hostid index 0f3d167..d4b56c5 100644 --- a/etc/rc.d/hostid +++ b/etc/rc.d/hostid @@ -47,10 +47,12 @@ hostid_set() # Generate hostid based on hostuuid - take first four bytes from md5(uuid). id=`echo -n $uuid | /sbin/md5` id="0x${id%????????????????????????}" + # Set both kern.hostuuid and kern.hostid. - echo "Setting hostuuid: ${uuid}." + # + [ -z "${rc_quiet}" ] && echo "Setting hostuuid: ${uuid}." ${SYSCTL_W} kern.hostuuid="${uuid}" >/dev/null - echo "Setting hostid: ${id}." + [ -z "${rc_quiet}" ] && echo "Setting hostid: ${id}." ${SYSCTL_W} kern.hostid=${id} >/dev/null } diff --git a/etc/rc.d/hostname b/etc/rc.d/hostname index 6d0f12e..52f4408 100644 --- a/etc/rc.d/hostname +++ b/etc/rc.d/hostname @@ -72,7 +72,7 @@ hostname_start() # All right, it is safe to invoke hostname(1) now. # - echo "Setting hostname: ${hostname}." + [ -z "${rc_quiet}" ] && echo "Setting hostname: ${hostname}." /bin/hostname "${hostname}" } diff --git a/etc/rc.d/ldconfig b/etc/rc.d/ldconfig index b8a5498..8e30576 100755 --- a/etc/rc.d/ldconfig +++ b/etc/rc.d/ldconfig @@ -36,7 +36,7 @@ ldconfig_start() _LDC="${_LDC} ${i}" fi done - echo 'ELF ldconfig path:' ${_LDC} + [ -z "${rc_quiet}" ] && echo 'ELF ldconfig path:' ${_LDC} ${ldconfig} -elf ${_ins} ${_LDC} case `sysctl -n hw.machine_arch` in @@ -55,7 +55,8 @@ ldconfig_start() _LDC="${_LDC} ${i}" fi done - echo '32-bit compatibility ldconfig path:' ${_LDC} + [ -z "${rc_quiet}" ] && + echo '32-bit compatibility ldconfig path:' ${_LDC} ${ldconfig} -32 -m ${_ins} ${_LDC} ;; esac @@ -71,7 +72,8 @@ ldconfig_start() _LDC="${_LDC} ${i}" fi done - echo 'a.out ldconfig path:' ${_LDC} + [ -z "${rc_quiet}" ] && + echo 'a.out ldconfig path:' ${_LDC} ${ldconfig} -aout ${_ins} ${_LDC} ;; esac diff --git a/etc/rc.d/motd b/etc/rc.d/motd index ddd55f9..0b6707a 100755 --- a/etc/rc.d/motd +++ b/etc/rc.d/motd @@ -22,13 +22,13 @@ motd_start() # Must be done *before* interactive logins are possible # to prevent possible race conditions. # - echo -n 'Updating motd' + [ -z "${rc_quiet}" ] && echo -n 'Updating motd:' if [ ! -f /etc/motd ]; then install -c -o root -g wheel -m ${PERMS} /dev/null /etc/motd fi if [ ! -w /etc/motd ]; then - echo ' ... /etc/motd is not writable, update failed.' + echo ' /etc/motd is not writable, update failed.' return fi @@ -42,7 +42,7 @@ motd_start() } rm -f $T - echo . + [ -z "${rc_quiet}" ] && echo . } load_rc_config $name diff --git a/etc/rc.d/moused b/etc/rc.d/moused index df1e27e..06a013b 100644 --- a/etc/rc.d/moused +++ b/etc/rc.d/moused @@ -51,7 +51,7 @@ moused_start() mytype="$moused_type" fi - echo -n "Starting ${ms} moused:" + [ -z "${rc_quiet}" ] && echo -n "Starting ${ms} moused." /usr/sbin/moused ${myflags} -p ${myport} -t ${mytype} ${pidarg} mousechar_arg= @@ -59,7 +59,6 @@ moused_start() [Nn][Oo] | '') ;; *) - echo -n ' mousechar_start' mousechar_arg="-M ${mousechar_start}" ;; esac @@ -67,7 +66,6 @@ moused_start() for ttyv in /dev/ttyv* ; do vidcontrol < ${ttyv} ${mousechar_arg} -m on done - echo '.' } run_rc_command $* diff --git a/etc/rc.d/newsyslog b/etc/rc.d/newsyslog index 7993d97..f03d97c 100755 --- a/etc/rc.d/newsyslog +++ b/etc/rc.d/newsyslog @@ -17,9 +17,9 @@ stop_cmd=":" newsyslog_start() { - echo -n "Creating and/or trimming log files:" + [ -z "${rc_quiet}" ] && echo -n "Creating and/or trimming log files:" ${command} ${rc_flags} - echo "." + [ -z "${rc_quiet}" ] && echo "." } load_rc_config $name diff --git a/etc/rc.d/savecore b/etc/rc.d/savecore index 816d842..428f7ac 100755 --- a/etc/rc.d/savecore +++ b/etc/rc.d/savecore @@ -57,7 +57,7 @@ savecore_prestart() savecore_start() { - echo "Checking for core dump on ${dumpdev}..." + [ -z "${rc_quiet}" ] && echo "Checking for core dump on ${dumpdev}..." savecore ${savecore_flags} ${DUMPDIR} ${dumpdev} } |