[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: RPM Creation



On Tuesday 09 July 2002 10:11 am, Fonteneau Vincent wrote:
> The package I created is not a src.rpm but i386.rpm so from a basic system
> I would like the user/group will be create in the binary rpm and directly
> add with the command rpm -ivh .... Is it possible ? or is it the command
> you gave me but I put them in wrong place. Is it in %prep, %build
> ...%install ?

The best place to put it would be in %pre, with something like this:

%pre
%{_sbindir}/useradd -d /myhomedir -s /bin/bash -u user \
        -g group  2>/dev/null 

and then possibly in preun
%preun
%{_sbindir}/userdel -r user

To remove the login when you uninstall the package.

cheers
john





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index] []