=?iso-8859-2?Q?Pawe=B3_=AFurowski?= wrote:
> Dnia 28-03-2005, pon o godzinie 21:23 +0300, Elan Ruusamäe napisał(a):
> > i did something like this:
> > 
> > m=$(%addusertogroup http blah)
> > if [ -n "$m" ]; then
> >     echo >&2 "$m"
> >     if [ -f /var/lock/subsys/apache ]; then
> >         /etc/rc.d/init.d/apache restart 1>&2
> >     fi
> >     if [ -f /var/lock/subsys/httpd ]; then
> >         /etc/rc.d/init.d/httpd restart 1>&2
> >     fi                                                                      
> >                                                    
> > fi 
> > 
> > but this doesn't look cool at all
> 
> how about:
> 
> %addusertogroup aaa bbb
> if [ $? -ne 0 ]; then
>   do sth when failed
> fi
> 
> IMO, it should work

IMO it will not.
Any failing command (returning nonzero status) would break script execution
AFAIK. 

-- 
=======================================================================
  Andrzej M. Krzysztofowicz               [EMAIL PROTECTED]
  phone (48)(58) 347 14 61
Faculty of Applied Phys. & Math.,   Gdansk University of Technology

_______________________________________________
pld-devel-en mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-devel-en

Reply via email to