Hi Eric,

first thanks for the fast response.
ls -l shows the same result as yours (-rwxr-xr-x  2 root root 19628 13. Aug 
2006  /opt/qtp-sandbox/usr/bin/id).
I have chrooted to /opt/qtp-sandbox and executed the /usr/bin/id commands on 
the commandline.
The check for groups (/usr/bin/id -g nofiles and /usr/bin/id -g qmail) returns 
the error "no such user". The check for users (/usr/bin/id -u alias) returns 
the userid for the user.
So the script will try to create the groups nofiles and qmail but they already 
exist. To check this I have created a bash script with the complete if-commands 
and executed it in the chroot. It says the groups nofiles and qmail does 
already exist, as expected. If I understand the id command right, with the -g 
option, it will return the group id of the given username. It will not check if 
a group exist.

By, Thomas

-----Original Message-----
From: Eric "Shubes" [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 08, 2007 2:53 PM
To: qmailtoaster-list@qmailtoaster.com
Subject: Re: [qmailtoaster] qmail-toaster update with qmail-tosterplus

Thomas Schmidt wrote:
> Hi,
>
> when I try to update my qmailtoster with the newmodel update script from
> qmailtoaster-plus I get the following an error on the command line
>
> Building qmail-toaster-1.03-1.3.14 ...
> Installing qmail-toaster-1.03-1.3.14 in the sandbox ...
> qtp-build-rpms - rpm -Uvh failed for qmail-toaster-1.03-1.3.14
> qtp-build-rpms - see
> /opt/qtp-sandbox/usr/src/qtp-upgrade/log/build-recent.log
> Build failed, Exiting.
>
> The logfile shows this:
> Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.28439
> + umask 022
> + cd /usr/src/redhat/BUILD
> + cd qmail-1.03
> + '[' -n /var/tmp/qmail-toaster-1.03 -a /var/tmp/qmail-toaster-1.03 '!='
> / ']'
> + rm -rf /var/tmp/qmail-toaster-1.03
> + '[' -d /usr/src/redhat/BUILD/qmail-1.03 ']'
> + rm -rf /usr/src/redhat/BUILD/qmail-1.03
> + exit 0
> Executing(--clean): /bin/sh -e /var/tmp/rpm-tmp.28439
> + umask 022
> + cd /usr/src/redhat/BUILD
> + rm -rf qmail-1.03
> + exit 0
> Installing qmail-toaster-1.03-1.3.14 in the sandbox ...
> Preparing...
> ##################################################
> error: %pre(qmail-toaster-1.03-1.3.14.i686) scriptlet failed, exit
> status 255
> error:   install: %pre scriptlet failed (2), skipping
> qmail-toaster-1.03-1.3.14
> qmail-pop3d-toaster
> ##################################################
>
> I use qmailtoaster-plus-0.2.8-1.3.10 and want to update from
> qmail-toaster-1.03-1.3.7 to 1.03-1.3.14.
> I have created a linked sandbox.
> The toaster runs on CentOS 4.4 and I have installed it with the script
> from Nick Hemmesch.
> What can I do to make it work with the newmodel update script or should
> I uninstall the howl toaster and reinstall the new version?
>
> By, Thomas
>

Well, my upgrade got past that point with no problem. I suppose that's good
in general, but not for Thomas.

Here's the %pre code from the qmail-toaster-1.03-1.3.14 spec file:
%pre
#----------------------------------------------------------------------------------

# Add users and groups as per Life With Qmail
#----------------------------------------------------------------------------------
echo " Adding qmailtoaster users and groups."
if [ -z "`/usr/bin/id -g nofiles 2>/dev/null`" ]; then
        /usr/sbin/groupadd -g 2107 -r nofiles 2>&1 || :
fi
if [ -z "`/usr/bin/id -g qmail 2>/dev/null`" ]; then
        /usr/sbin/groupadd -g 2108 -r qmail 2>&1 || :
fi


if [ -z "`/usr/bin/id -u alias 2>/dev/null`" ]; then
        /usr/sbin/useradd -u 7790 -r -M -d %{qdir}/alias -s /sbin/nologin -c
"qmail alias" -g qmail alias  2>&1 || :
fi
if [ -z "`/usr/bin/id -u qmaild 2>/dev/null`" ]; then
        /usr/sbin/useradd -u 7791 -r -M -d %{qdir} -s /sbin/nologin -c
"qmail daemon" -g qmail qmaild  2>&1 || :
fi
if [ -z "`/usr/bin/id -u qmaill 2>/dev/null`" ]; then
        /usr/sbin/useradd -u 7792 -r -M -d %{qdir} -s /sbin/nologin -c
"qmail logger" -g qmail qmaill  2>&1 || :
fi
if [ -z "`/usr/bin/id -u qmailp 2>/dev/null`" ]; then
        /usr/sbin/useradd -u 7793 -r -M -d %{qdir} -s /sbin/nologin -c
"qmail passwd" -g qmail qmailp  2>&1 || :
fi
if [ -z "`/usr/bin/id -u qmailq 2>/dev/null`" ]; then
        /usr/sbin/useradd -u 7794 -r -M -d %{qdir} -s /sbin/nologin -c
"qmail queue" -g qmail qmailq  2>&1 || :
fi
if [ -z "`/usr/bin/id -u qmailr 2>/dev/null`" ]; then
        /usr/sbin/useradd -u 7795 -r -M -d %{qdir} -s /sbin/nologin -c
"qmail remote" -g qmail qmailr  2>&1 || :
fi
if [ -z "`/usr/bin/id -u qmails 2>/dev/null`" ]; then
        /usr/sbin/useradd -u 7796 -r -M -d %{qdir} -s /sbin/nologin -c
"qmail send" -g qmail qmails  2>&1 || :
fi

In a nutshell, it's checking to see if all your users are defined, and if
they're not, they're created.

Since you're upgrading, all of these user ids should already exist. For some
reason though, the code that checks them appears to be failing. I'm
guessing, there might be a problem with your /usr/bin/id program, as that's
the only program that should be being executed in your situation. What does
# ls -l /opt/qtp-sandbox/usr/bin/id
show you? Should be:
-rwxr-xr-x  2 root root 19628 Aug 13  2006 /opt/qtp-sandbox/usr/bin/id

Can you chroot into the sandbox and run the id command(s)?

--
-Eric 'shubes'

---------------------------------------------------------------------
     QmailToaster hosted by: VR Hosted <http://www.vr.org>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
     QmailToaster hosted by: VR Hosted <http://www.vr.org>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to