doiggl@velocitynet.com.au napsal(a):
Hello, I am trying to compile the cricket from source code. I am using this a guide to try and get it going:- http://cricket.sourceforge.net/support/doc/beginner.html
I need to put the following commands into the spec file
1. Setup cricket userid and group [done]
%pre id cricket >/dev/null 2>&1 if [ $? -ne 0 ]; then /usr/sbin/groupadd cricket /usr/sbin/useradd -r -d %{_libdir}/%{name} -c "Cricket SNMP Monitor" cricket fi
You have it too simple. Correct way to check account is getent (user can use ldap, NIS...). And it can happen that group exist, but username not, and vice versa. This is sniplet we use in Spacewalk project: %define package_name nocpulse getent group %{package_name} >/dev/null || groupadd -r %{package_name} getent passwd %{package_name} >/dev/null || \ useradd -r -g %{package_name} -G apache \ -d %{_var}/lib/%{package_name} -s /bin/bash \ -c "NOCpulse user" %{package_name} Miroslav Suchy -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org