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
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=179945
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"
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 | \

View File

@ -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

View File

@ -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
}

View File

@ -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}"
}

View File

@ -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

View File

@ -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

View File

@ -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 $*

View File

@ -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

View File

@ -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}
}