SPECS: popa3d.spec - use existing dir (/usr/share/empty) for pop3
...
Elan Ruusamäe
glen at delfi.ee
Fri Jul 15 08:58:15 CEST 2005
On Friday 15 July 2005 01:14, qboosh wrote:
> Author: qboosh Date: Thu Jul 14 22:14:56 2005 GMT
> Module: SPECS Tag: HEAD
> ---- Log message:
> - use existing dir (/usr/share/empty) for pop3 user
[...]
> %pre
> -%useradd -u 60 -r -d /dev/null -s /bin/false -c "pop3 user" -g nobody pop3
> +%useradd -u 60 -r -d /usr/share/empty -s /bin/false -c "pop3 user" -g
> nobody pop3
btw, -d /usr/share/empty and -s /bin/false are defaults, these need not be
spefified.
or it's better to still specify these in spec file to have better overview?
+v+
rpm -E '%useradd -u 60 -r -c "pop3 user" -g nobody pop3'
if [ -n "`/bin/id -u pop3 2>/dev/null`" ]; then
if [ "`/bin/id -u pop3`" != "60" ]; then
echo "Error: user pop3 doesn't have uid=60. Correct this before installing
%{name}." 1>&2
exit 1
fi
else
echo "Adding user pop3 UID=60."
/usr/sbin/useradd \
-u 60 \
-r \
-d /usr/share/empty \
-s /bin/false \
-c "pop3 user"\
-g nobody \
\
\
pop3 1>&2
fi;
-v-
--
glen
More information about the pld-devel-en
mailing list