%addusertogroup macro
Paweł Żurowski
pzurowski at pld-linux.org
Mon Mar 28 23:13:40 CEST 2005
Dnia 28-03-2005, pon o godzinie 22:15 +0200, Andrzej Krzysztofowicz
napisał(a):
> > 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.
are you sure?
[pawel at aktyn ~/rpm/SPECS]$ sudo rpm -Uvh ../RPMS/dummy-1-8.i686.rpm
Przygotowywanie... ########################################### [100%]
dziala
1:dummy ########################################### [100%]
[pawel at aktyn ~/rpm/SPECS]$ grep -A5 "^%pre$" dummy.spec
%pre
/bin/false
if [ $? -ne 0 ]; then
echo dziala
fi
rpm -q dummy shows that package have been installed
instead of /bin/false it can be any script...
regards
-pawel
--
Pawel Zurowski
More information about the pld-devel-en
mailing list