Hi.

We'd like to rename the 'faulty' listing to 'failed'.
i.e. rcctl ls failed

'faulty' does sound a bit weird and is not obvious to remember.
Now the question is should we keep supporting the 'faulty' keyword or not?
I'm not in favor of adding a knob especially when it's just an alias; that'd 
also mean documenting it.

Here's a diff that does s/faulty/failed
Would that of any concern for anyone?



Index: etc/daily
===================================================================
RCS file: /cvs/src/etc/daily,v
retrieving revision 1.85
diff -u -p -u -p -r1.85 daily
--- etc/daily   28 Jan 2016 15:45:34 -0000      1.85
+++ etc/daily   29 Mar 2016 13:25:59 -0000
@@ -127,7 +127,7 @@ while [ "X$ROOTBACKUP" = X1 ]; do
 done
 
 next_part "Services that should run but don't:"
-rcctl ls faulty
+rcctl ls failed
 
 next_part "Checking subsystem status:"
 if [ "X$VERBOSESTATUS" != X0 ]; then
Index: usr.sbin/rcctl/rcctl.8
===================================================================
RCS file: /cvs/src/usr.sbin/rcctl/rcctl.8,v
retrieving revision 1.30
diff -u -p -u -p -r1.30 rcctl.8
--- usr.sbin/rcctl/rcctl.8      30 Jan 2016 18:57:31 -0000      1.30
+++ usr.sbin/rcctl/rcctl.8      29 Mar 2016 13:25:59 -0000
@@ -103,7 +103,7 @@ which can be one of:
 .Bl -tag -width started -offset indent -compact
 .It Cm all
 all services and daemons
-.It Cm faulty
+.It Cm failed
 enabled but stopped daemons
 .It Cm off
 disabled services and daemons
@@ -171,7 +171,7 @@ exits with 0 if the daemon or service is
 .Nm Cm getdef Ar daemon | service Op Cm status
 exits with 0 if the daemon or service is enabled by default
 and 1 if it is not.
-.Nm Cm ls faulty
+.Nm Cm ls failed
 exits with 1 if an enabled daemon is not running.
 Otherwise, the
 .Nm
Index: usr.sbin/rcctl/rcctl.sh
===================================================================
RCS file: /cvs/src/usr.sbin/rcctl/rcctl.sh,v
retrieving revision 1.91
diff -u -p -u -p -r1.91 rcctl.sh
--- usr.sbin/rcctl/rcctl.sh     28 Mar 2016 08:10:19 -0000      1.91
+++ usr.sbin/rcctl/rcctl.sh     29 Mar 2016 13:25:59 -0000
@@ -31,7 +31,7 @@ usage()
        "usage: rcctl get|getdef|set service | daemon [variable [arguments]]
        rcctl [-df] $(echo ${_rc_actions} | tr "[:blank:]" "|") daemon ...
        rcctl disable|enable|order [daemon ...]
-       rcctl ls all|faulty|off|on|started|stopped"
+       rcctl ls all|failed|off|on|started|stopped"
 }
 
 needs_root()
@@ -182,7 +182,7 @@ svc_ls()
                                echo ${_special_svcs} | tr "[:blank:]" "\n"
                        ) | sort
                        ;;
-               faulty)
+               failed)
                        for _svc in $(svc_ls on); do
                                ! svc_is_special ${_svc} && \
                                        ! /etc/rc.d/${_svc} check >/dev/null && 
\
@@ -444,7 +444,7 @@ ret=0
 case ${action} in
        ls)
                lsarg=$2
-               [[ ${lsarg} == @(all|faulty|off|on|started|stopped) ]] || usage
+               [[ ${lsarg} == @(all|failed|off|on|started|stopped) ]] || usage
                ;;
        order)
                shift 1
@@ -529,7 +529,7 @@ case ${action} in
                ;;
        ls)
                # some rc.d(8) scripts need root for rc_check()
-               [[ ${lsarg} == @(started|stopped|faulty) ]] && needs_root 
${action} ${lsarg}
+               [[ ${lsarg} == @(started|stopped|failed) ]] && needs_root 
${action} ${lsarg}
                svc_ls ${lsarg}
                ;;
        order)




-- 
Antoine

Reply via email to