From b46fecfe2999c869c28c8b5af7cc925e43709dd6 Mon Sep 17 00:00:00 2001 From: mtm Date: Fri, 25 Jan 2008 15:06:26 +0000 Subject: If the rc.conf(5) variable for a script is not enabled do not fail silently. Display a message that the command wasn't run and make possible suggestions for what to do. PR: conf/118770 MFC after: 1 week --- etc/rc.subr | 3 +++ 1 file changed, 3 insertions(+) diff --git a/etc/rc.subr b/etc/rc.subr index ba3e0a4..013f30b 100644 --- a/etc/rc.subr +++ b/etc/rc.subr @@ -606,6 +606,9 @@ run_rc_command() # if [ -n "${rcvar}" -a "$rc_arg" != "rcvar" ]; then if ! checkyesno ${rcvar}; then + echo -n "Cannot '${rc_arg}' $name. Set ${rcvar} to " + echo -n "YES in /etc/rc.conf or use 'one${rc_arg}' " + echo "instead of '${rc_arg}'." return 0 fi fi -- cgit v1.1