Mailinglist Archive: opensuse-buildservice (312 mails)

< Previous Next >
Re: [opensuse-buildservice] Query re 'useradd' and 'userdel' commands.
  • From: <doiggl@xxxxxxxxxxxxxxxxxx>
  • Date: Wed, 22 Jul 2009 23:40:36 +1000
  • Message-id: <fe07bc89c55f7308aa962fb10184b83f@xxxxxxxxxxxxxxxxxxxxxxx>
Thanks Dominique
- I edited the spec file and put in fully qualified commands then
resubmitted the job.
- Commands in the spec file now read -

%pre
id cricket >/dev/null 2>&1
if [ $? -ne 0 ]; then
/usr/sbin/useradd -r -d %{_libdir}/%{name} -c "Cricket SNMP Monitor"
cricket
fi

%postun
if [ $1 -eq 0 ]; then
/usr/sbin/userdel cricket
fi

- I got the following result:- in the log:

+ cd /usr/src/packages/BUILD
+ cd cricket-1.0.5
+ /bin/rm -rf /var/tmp/cricket-1.0.5-12.1-root
+ exit 0
... checking for files with abuild user/group
... running 00-check-install-rpms
... installing all built rpms
Preparing packages for installation...
/var/tmp/rpm-tmp.4324: line 3: /usr/sbin/useradd: No such file or directory
error: %pre(cricket-1.0.5-12.1.x86_64) scriptlet failed, exit status 127
error: install: %pre scriptlet failed (2), skipping cricket-1.0.5-12.1
failed to install rpms, aborting build
System halted.

It still could not find /usr/sbin/useradd
I'm puzzled about that.
I must be still missing something.
Any help welcome
Glenn
https://build.opensuse.org/package/show?package=cricket&project=home%3Adoiggl

Dominique wrote:
You have to use /usr/sbin/useradd & /usr/sbin/userdel.

Dominique

--
To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-buildservice+help@xxxxxxxxxxxx

< Previous Next >