Re: rcctl ls faulty -> failed

2016-03-29 Thread Joerg Jung
On Tue, Mar 29, 2016 at 08:22:31AM -0600, Todd C. Miller wrote:
> On Tue, 29 Mar 2016 15:29:27 +0200, Antoine Jacoutot wrote:
> 
> > 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.
> 
> I like this.

Me too.



Re: rcctl ls faulty -> failed

2016-03-29 Thread Rob Pierce
> From: "Antoine Jacoutot" <ajacou...@bsdfrog.org>
> To: "Ian Darwin" <i...@darwinsys.com>
> Cc: "tech" <tech@openbsd.org>
> Sent: Tuesday, March 29, 2016 10:59:54 AM
> Subject: Re: rcctl ls faulty -> failed

> On Tue, Mar 29, 2016 at 10:48:17AM -0400, Ian Darwin wrote:
> > On Tue, Mar 29, 2016 at 03:29:27PM +0200, Antoine Jacoutot wrote:
> > > Hi.

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

> > > 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 - 1.85
> > > +++ etc/daily 29 Mar 2016 13:25:59 -
> > > @@ -127,7 +127,7 @@ while [ "X$ROOTBACKUP" = X1 ]; do
> > > done

> > > next_part "Services that should run but don't:"

> > While you're there, can you please change "should run but don't" to
> > "should be running but aren't" ? The current wording is awkward,
> > and also implies that they don't run (ie. they fail to start)
> > when in fact they may have been running but been shut down
> > manually, or failed. Language should be precise as well as concise.

> Sure.

> --
> Antoine
Contractions aren't necessary. 

http://courses.cs.vt.edu/cs3604/support/Writing/writing.caveats.html 


Re: rcctl ls faulty -> failed

2016-03-29 Thread Antoine Jacoutot
On Tue, Mar 29, 2016 at 10:48:17AM -0400, Ian Darwin wrote:
> On Tue, Mar 29, 2016 at 03:29:27PM +0200, Antoine Jacoutot wrote:
> > Hi.
> > 
> > We'd like to rename the 'faulty' listing to 'failed'.
> > i.e. rcctl ls failed
> > 
> > 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 -  1.85
> > +++ etc/daily   29 Mar 2016 13:25:59 -
> > @@ -127,7 +127,7 @@ while [ "X$ROOTBACKUP" = X1 ]; do
> >  done
> >  
> >  next_part "Services that should run but don't:"
> 
> While you're there, can you please change "should run but don't" to
> "should be running but aren't" ? The current wording is awkward,
> and also implies that they don't run (ie. they fail to start)
> when in fact they may have been running but been shut down
> manually, or failed. Language should be precise as well as concise.

Sure.

-- 
Antoine



Re: rcctl ls faulty -> failed

2016-03-29 Thread Ian Darwin
On Tue, Mar 29, 2016 at 03:29:27PM +0200, Antoine Jacoutot wrote:
> Hi.
> 
> We'd like to rename the 'faulty' listing to 'failed'.
> i.e. rcctl ls failed
> 
> 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 -  1.85
> +++ etc/daily 29 Mar 2016 13:25:59 -
> @@ -127,7 +127,7 @@ while [ "X$ROOTBACKUP" = X1 ]; do
>  done
>  
>  next_part "Services that should run but don't:"

While you're there, can you please change "should run but don't" to
"should be running but aren't" ? The current wording is awkward,
and also implies that they don't run (ie. they fail to start)
when in fact they may have been running but been shut down
manually, or failed. Language should be precise as well as concise.



Re: rcctl ls faulty -> failed

2016-03-29 Thread Todd C. Miller
On Tue, 29 Mar 2016 15:29:27 +0200, Antoine Jacoutot wrote:

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

I like this.

 - todd



rcctl ls faulty -> failed

2016-03-29 Thread Antoine Jacoutot
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 -  1.85
+++ etc/daily   29 Mar 2016 13:25:59 -
@@ -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 -  1.30
+++ usr.sbin/rcctl/rcctl.8  29 Mar 2016 13:25:59 -
@@ -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 -  1.91
+++ usr.sbin/rcctl/rcctl.sh 29 Mar 2016 13:25:59 -
@@ -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