Update pre post preun and postun scripts
This commit is contained in:
parent
c4c518457a
commit
3744cb1ab6
@ -1,4 +1,3 @@
|
||||
%define uid 50
|
||||
%define username saslauth
|
||||
%define hint "Saslauthd user"
|
||||
%define homedir %{_var}/empty/%{username}
|
||||
@ -9,7 +8,7 @@
|
||||
Summary: The Cyrus SASL library
|
||||
Name: cyrus-sasl
|
||||
Version: 2.1.23
|
||||
Release: 10%{?dist}
|
||||
Release: 11%{?dist}
|
||||
License: BSD
|
||||
Group: System Environment/Libraries
|
||||
# Source0 originally comes from ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/;
|
||||
@ -53,8 +52,8 @@ Requires(post): chkconfig, /sbin/service
|
||||
Requires(pre): /usr/sbin/useradd /usr/sbin/groupadd
|
||||
Requires(postun): /usr/sbin/userdel /usr/sbin/groupdel
|
||||
Requires: /sbin/nologin
|
||||
Provides: user(%username) = %uid
|
||||
Provides: group(%username) = %uid
|
||||
Provides: user(%username)
|
||||
Provides: group(%username)
|
||||
|
||||
|
||||
%description
|
||||
@ -312,24 +311,28 @@ rm -f $RPM_BUILD_ROOT%{_mandir}/cat8/saslauthd.8
|
||||
test "$RPM_BUILD_ROOT" != "/" && rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
%pre
|
||||
%__fe_groupadd %{uid} -r %{username} >/dev/null 2>&1 || :
|
||||
%__fe_useradd %{uid} -r -c \"%{hint}\" -g %{username} -s /sbin/nologin -d %{homedir} %{username} >/dev/null 2>&1 || :
|
||||
getent group %{username} >/dev/null || groupadd -r %{username}
|
||||
getent passwd %{username} >/dev/null || \
|
||||
useradd -r -g %{username} -d %{homedir} -s /sbin/nologin \
|
||||
-c \"%{hint}\" %{username}
|
||||
exit 0
|
||||
|
||||
%post
|
||||
/sbin/chkconfig --add saslauthd
|
||||
exit 0
|
||||
|
||||
%preun
|
||||
if [ $1 -eq 0 ] ; then
|
||||
/sbin/service saslauthd stop 2>&1 > /dev/null
|
||||
/sbin/chkconfig --del saslauthd
|
||||
fi
|
||||
exit 0
|
||||
|
||||
%postun
|
||||
if [ $1 -ne 0 ] ; then
|
||||
/sbin/service saslauthd condrestart 2>&1 > /dev/null
|
||||
fi
|
||||
%__fe_userdel %{username} >/dev/null 2>&1 || :
|
||||
%__fe_groupdel %{username} >/dev/null 2>&1 || :
|
||||
exit 0
|
||||
|
||||
%post lib -p /sbin/ldconfig
|
||||
%postun lib -p /sbin/ldconfig
|
||||
@ -396,6 +399,9 @@ fi
|
||||
%{_sbindir}/sasl2-shared-mechlist
|
||||
|
||||
%changelog
|
||||
* Fri Mar 11 2010 Jan F. Chadima <jchadima@redhat.com> - 2.1.23-11
|
||||
- Update pre post preun and postun scripts
|
||||
|
||||
* Wed Mar 10 2010 Jan F. Chadima <jchadima@redhat.com> - 2.1.23-10
|
||||
- Rewrite spec file, make corect CFLAGS, CPPFLAGS and LDFLAGS
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user