Move a lot of diagnostic output behind $rc_quiet in scripts that

implement their own start command.
This commit is contained in:
Mike Makonnen 2008-06-23 04:46:54 +00:00
parent 252c018f5f
commit 94789e5ca4
9 changed files with 19 additions and 17 deletions

View File

@ -31,7 +31,7 @@ bgfsck_start ()
bgfsck_msg="${bgfsck_msg} in ${background_fsck_delay} seconds" bgfsck_msg="${bgfsck_msg} in ${background_fsck_delay} seconds"
fi fi
if [ -z "${rc_force}" ]; then if [ -z "${rc_force}" ]; then
echo "${bgfsck_msg}." [ -z "${rc_quiet}" ] && echo "${bgfsck_msg}."
fi fi
(sleep ${background_fsck_delay}; nice -4 fsck -B -p) 2>&1 | \ (sleep ${background_fsck_delay}; nice -4 fsck -B -p) 2>&1 | \

View File

@ -23,7 +23,7 @@ fsck_start()
# During fsck ignore SIGQUIT # During fsck ignore SIGQUIT
trap : 3 trap : 3
echo "Starting file system checks:" [ -z "${rc_quiet}" ] && echo "Starting file system checks:"
if checkyesno background_fsck; then if checkyesno background_fsck; then
fsck -F -p fsck -F -p
else else

View File

@ -47,10 +47,12 @@ hostid_set()
# Generate hostid based on hostuuid - take first four bytes from md5(uuid). # Generate hostid based on hostuuid - take first four bytes from md5(uuid).
id=`echo -n $uuid | /sbin/md5` id=`echo -n $uuid | /sbin/md5`
id="0x${id%????????????????????????}" id="0x${id%????????????????????????}"
# Set both kern.hostuuid and kern.hostid. # 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 ${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 ${SYSCTL_W} kern.hostid=${id} >/dev/null
} }

View File

@ -72,7 +72,7 @@ hostname_start()
# All right, it is safe to invoke hostname(1) now. # All right, it is safe to invoke hostname(1) now.
# #
echo "Setting hostname: ${hostname}." [ -z "${rc_quiet}" ] && echo "Setting hostname: ${hostname}."
/bin/hostname "${hostname}" /bin/hostname "${hostname}"
} }

View File

@ -36,7 +36,7 @@ ldconfig_start()
_LDC="${_LDC} ${i}" _LDC="${_LDC} ${i}"
fi fi
done done
echo 'ELF ldconfig path:' ${_LDC} [ -z "${rc_quiet}" ] && echo 'ELF ldconfig path:' ${_LDC}
${ldconfig} -elf ${_ins} ${_LDC} ${ldconfig} -elf ${_ins} ${_LDC}
case `sysctl -n hw.machine_arch` in case `sysctl -n hw.machine_arch` in
@ -55,7 +55,8 @@ ldconfig_start()
_LDC="${_LDC} ${i}" _LDC="${_LDC} ${i}"
fi fi
done done
echo '32-bit compatibility ldconfig path:' ${_LDC} [ -z "${rc_quiet}" ] &&
echo '32-bit compatibility ldconfig path:' ${_LDC}
${ldconfig} -32 -m ${_ins} ${_LDC} ${ldconfig} -32 -m ${_ins} ${_LDC}
;; ;;
esac esac
@ -71,7 +72,8 @@ ldconfig_start()
_LDC="${_LDC} ${i}" _LDC="${_LDC} ${i}"
fi fi
done done
echo 'a.out ldconfig path:' ${_LDC} [ -z "${rc_quiet}" ] &&
echo 'a.out ldconfig path:' ${_LDC}
${ldconfig} -aout ${_ins} ${_LDC} ${ldconfig} -aout ${_ins} ${_LDC}
;; ;;
esac esac

View File

@ -22,13 +22,13 @@ motd_start()
# Must be done *before* interactive logins are possible # Must be done *before* interactive logins are possible
# to prevent possible race conditions. # to prevent possible race conditions.
# #
echo -n 'Updating motd' [ -z "${rc_quiet}" ] && echo -n 'Updating motd:'
if [ ! -f /etc/motd ]; then if [ ! -f /etc/motd ]; then
install -c -o root -g wheel -m ${PERMS} /dev/null /etc/motd install -c -o root -g wheel -m ${PERMS} /dev/null /etc/motd
fi fi
if [ ! -w /etc/motd ]; then if [ ! -w /etc/motd ]; then
echo ' ... /etc/motd is not writable, update failed.' echo ' /etc/motd is not writable, update failed.'
return return
fi fi
@ -42,7 +42,7 @@ motd_start()
} }
rm -f $T rm -f $T
echo . [ -z "${rc_quiet}" ] && echo .
} }
load_rc_config $name load_rc_config $name

View File

@ -51,7 +51,7 @@ moused_start()
mytype="$moused_type" mytype="$moused_type"
fi fi
echo -n "Starting ${ms} moused:" [ -z "${rc_quiet}" ] && echo -n "Starting ${ms} moused."
/usr/sbin/moused ${myflags} -p ${myport} -t ${mytype} ${pidarg} /usr/sbin/moused ${myflags} -p ${myport} -t ${mytype} ${pidarg}
mousechar_arg= mousechar_arg=
@ -59,7 +59,6 @@ moused_start()
[Nn][Oo] | '') [Nn][Oo] | '')
;; ;;
*) *)
echo -n ' mousechar_start'
mousechar_arg="-M ${mousechar_start}" mousechar_arg="-M ${mousechar_start}"
;; ;;
esac esac
@ -67,7 +66,6 @@ moused_start()
for ttyv in /dev/ttyv* ; do for ttyv in /dev/ttyv* ; do
vidcontrol < ${ttyv} ${mousechar_arg} -m on vidcontrol < ${ttyv} ${mousechar_arg} -m on
done done
echo '.'
} }
run_rc_command $* run_rc_command $*

View File

@ -17,9 +17,9 @@ stop_cmd=":"
newsyslog_start() newsyslog_start()
{ {
echo -n "Creating and/or trimming log files:" [ -z "${rc_quiet}" ] && echo -n "Creating and/or trimming log files:"
${command} ${rc_flags} ${command} ${rc_flags}
echo "." [ -z "${rc_quiet}" ] && echo "."
} }
load_rc_config $name load_rc_config $name

View File

@ -57,7 +57,7 @@ savecore_prestart()
savecore_start() savecore_start()
{ {
echo "Checking for core dump on ${dumpdev}..." [ -z "${rc_quiet}" ] && echo "Checking for core dump on ${dumpdev}..."
savecore ${savecore_flags} ${DUMPDIR} ${dumpdev} savecore ${savecore_flags} ${DUMPDIR} ${dumpdev}
} }