%addusertogroup macro
Paweł Żurowski
pzurowski at pld-linux.org
Mon Mar 28 22:18:44 CEST 2005
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
regards
-pawel
--
Pawel Zurowski
More information about the pld-devel-en
mailing list