On Sun, Jul 31, 2011 at 03:04:05PM +0200, Lukas Fleischer wrote:
> On Sun, Jul 31, 2011 at 08:35:01AM -0400, Dave Reisner wrote:
> > We still default to listing all daemons if none are specified.
> > 
> > Signed-off-by: Dave Reisner <[email protected]>
> > ---
> >  rc.d |    7 ++++++-
> >  1 files changed, 6 insertions(+), 1 deletions(-)
> > 
> > diff --git a/rc.d b/rc.d
> > index a7b214e..bfc4719 100755
> > --- a/rc.d
> > +++ b/rc.d
> > @@ -33,7 +33,12 @@ case $1 in
> >     list)
> >             shift
> >             cd /etc/rc.d/
> > -           for d in *; do
> > +           if (( $# )); then
> > +                   daemons=("$@")
> > +           else
> > +                   daemons=(*)
> > +           fi
> > +           for d in "${daemons[@]}"; do
> 
> This breaks both `rc.d list started` and `rc.d list stopped`. We either
> need to introduce exceptions here or create a separate option to list
> specific daemons only.
> 

Wow, I totally breezed over that part... disregard this.

d

> >                     have_daemon "$d" || continue
> >                     # print running / stopped satus
> >                     if ! ck_daemon "$d"; then
> > -- 
> > 1.7.6

Reply via email to