%useradd/%groupadd macros

Elan Ruusamäe glen at delfi.ee
Fri Apr 8 22:57:15 CEST 2005


version three
http://glen.alkohol.ee/pld/useradd-3.txt

this one generates error message if required parameter is missing and does 
exit 1. i have not found a way to generate error at package time.

i've found that the remaining arguments from -c option get their way into %2, 
%3 and so on. so this one has %if check on parameter count, and if it's 
bigger than 1, then %1 and %2 are swapped for $user and $comment

this macro works with assumption that only -c option is used with space. i 
haven't yet seen any package having other options with space. so i guess it's 
ready to go to cvs?

and you can use goddammit.spec to see the macro in work :)
and unless you have beer installed pass the --nodeps:
$ rpmbuild -bb goddamnit.spec --nodeps --short-circuit

-- 
glen




More information about the pld-devel-en mailing list