Hi !

I have a problem here. I tried to use the above mentioned macro. It 
seems i fail to find the right syntax. 

I have tried 

%_pre_useradd vdr /var/lib/vdr

but that seems not to work. I had then a look at the rpm macros and the 
user-helper script. 

Thats is the macro: 
%_add_user_helper /usr/share/rpm-helper/add-user
%_pre_useradd() %_add_user_helper %{name} $1 %{1} %{2} %{3} \
%{nil}

I suppose %nil to be an empty string. But with that , the following 
script would not work. 

if [ $# -lt 5 ]; then
    echo "usage: $0 <pkg name> <num installed> <user name> <home dir> 
<shell>" 1>&2
    exit 1
fi

pkg=$1                          # name of the package
num=$2                          # number of packages installed
name=$3                         # name of the user
dir=$4                          # home directory
shell=$5                        # shell



So shouldn't it be 

%_pre_useradd() %_add_user_helper %{name} $1 %{1} %{2} %{3} %{4} 

then ? 

Further I don't know which number i should give fro %{1}, i suppose from 
reading rpm howto, that 1 is the right, as the user should only be 
created if the package is installed the first time. Is this right ? 

Sorry if this is just dump, i try hard to learn how all these things 
work ;) 

Hope somebody could shed some light on this as it seems i can't get it 
to work. 

Greets

Steffen


Reply via email to