temporarilly revert systemd units

This commit is contained in:
Jan F 2011-04-28 18:19:48 +02:00
parent ebad43de9d
commit 842cad7440
1 changed files with 15 additions and 1 deletions

View File

@ -4,11 +4,12 @@
%define _plugindir2 %{_libdir}/sasl2 %define _plugindir2 %{_libdir}/sasl2
%define bootstrap_cyrus_sasl 0 %define bootstrap_cyrus_sasl 0
%define systemd 0
Summary: The Cyrus SASL library Summary: The Cyrus SASL library
Name: cyrus-sasl Name: cyrus-sasl
Version: 2.1.23 Version: 2.1.23
Release: 18%{?dist} Release: 19%{?dist}
License: BSD with advertising License: BSD with advertising
Group: System Environment/Libraries Group: System Environment/Libraries
# Source0 originally comes from ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/; # Source0 originally comes from ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/;
@ -291,8 +292,10 @@ install -m755 -d $RPM_BUILD_ROOT/var/run/saslauthd
# Install the init script for saslauthd and the init script's config file. # Install the init script for saslauthd and the init script's config file.
install -m755 -d $RPM_BUILD_ROOT/etc/rc.d/init.d $RPM_BUILD_ROOT/etc/sysconfig install -m755 -d $RPM_BUILD_ROOT/etc/rc.d/init.d $RPM_BUILD_ROOT/etc/sysconfig
install -m755 -p %{SOURCE4} $RPM_BUILD_ROOT/etc/rc.d/init.d/saslauthd install -m755 -p %{SOURCE4} $RPM_BUILD_ROOT/etc/rc.d/init.d/saslauthd
%if %{systemd}
install -d -m755 $RPM_BUILD_ROOT/%{_unitdir} install -d -m755 $RPM_BUILD_ROOT/%{_unitdir}
install -m644 -p %{SOURCE5} $RPM_BUILD_ROOT/%{_unitdir}/saslauthd install -m644 -p %{SOURCE5} $RPM_BUILD_ROOT/%{_unitdir}/saslauthd
%endif
install -m644 -p %{SOURCE9} $RPM_BUILD_ROOT/etc/sysconfig/saslauthd install -m644 -p %{SOURCE9} $RPM_BUILD_ROOT/etc/sysconfig/saslauthd
install -m755 -d $RPM_BUILD_ROOT/etc/tmpfiles.d install -m755 -d $RPM_BUILD_ROOT/etc/tmpfiles.d
install -m644 -p %{SOURCE11} $RPM_BUILD_ROOT/etc/tmpfiles.d/saslauthd.conf install -m644 -p %{SOURCE11} $RPM_BUILD_ROOT/etc/tmpfiles.d/saslauthd.conf
@ -324,11 +327,13 @@ useradd -r -g %{username} -d %{homedir} -s /sbin/nologin \
exit 0 exit 0
%post %post
%if %{systemd}
if [ -x /bin/systemctl ]; then if [ -x /bin/systemctl ]; then
if [ $1 -eq 1 ]; then if [ $1 -eq 1 ]; then
/bin/systemctl daemon-reload >/dev/null 2>&1 || : /bin/systemctl daemon-reload >/dev/null 2>&1 || :
fi fi
fi fi
%endif
if [ -x /sbin/chkconfig ]; then if [ -x /sbin/chkconfig ]; then
/sbin/chkconfig --add saslauthd /sbin/chkconfig --add saslauthd
fi fi
@ -336,10 +341,12 @@ exit 0
%preun %preun
if [ $1 -eq 0 ]; then if [ $1 -eq 0 ]; then
%if %{systemd}
if [ -x /bin/systemctl ]; then if [ -x /bin/systemctl ]; then
/bin/systemctl disable saslauthd.service >/dev/null 2>&1 || : /bin/systemctl disable saslauthd.service >/dev/null 2>&1 || :
/bin/systemctl stop saslauthd.service >/dev/null 2>&1 || : /bin/systemctl stop saslauthd.service >/dev/null 2>&1 || :
fi fi
%endif
if [ -x /sbin/service ]; then if [ -x /sbin/service ]; then
/sbin/service saslauthd stop >/dev/null 2>&1 || : /sbin/service saslauthd stop >/dev/null 2>&1 || :
fi fi
@ -350,12 +357,14 @@ fi
exit 0 exit 0
%postun %postun
%if %{systemd}
if [ -x /bin/systemctl ]; then if [ -x /bin/systemctl ]; then
/bin/systemctl daemon-reload >/dev/null 2>&1 || : /bin/systemctl daemon-reload >/dev/null 2>&1 || :
if [ $1 -ge 1 ]; then if [ $1 -ge 1 ]; then
/bin/systemctl try-restart saslauthd.service >/dev/null 2>&1 || : /bin/systemctl try-restart saslauthd.service >/dev/null 2>&1 || :
fi fi
fi fi
%endif
if [ -x /sbin/service ];then if [ -x /sbin/service ];then
if [ $1 -ne 0 ]; then if [ $1 -ne 0 ]; then
/sbin/service saslauthd condrestart 2>&1 > /dev/null /sbin/service saslauthd condrestart 2>&1 > /dev/null
@ -376,7 +385,9 @@ exit 0
%{_sbindir}/testsaslauthd %{_sbindir}/testsaslauthd
%config(noreplace) /etc/sysconfig/saslauthd %config(noreplace) /etc/sysconfig/saslauthd
/etc/rc.d/init.d/saslauthd /etc/rc.d/init.d/saslauthd
%if %{systemd}
%{_unitdir}/saslauthd %{_unitdir}/saslauthd
%endif
/etc/tmpfiles.d/saslauthd.conf /etc/tmpfiles.d/saslauthd.conf
%ghost /var/run/saslauthd %ghost /var/run/saslauthd
@ -430,6 +441,9 @@ exit 0
%{_sbindir}/sasl2-shared-mechlist %{_sbindir}/sasl2-shared-mechlist
%changelog %changelog
* Thu Apr 28 2011 Jan F. Chadima <jchadima@redhat.com> - 2.1.23-19
- temporarilly revert systemd units
* Tue Apr 26 2011 Jan F. Chadima <jchadima@redhat.com> - 2.1.23-18 * Tue Apr 26 2011 Jan F. Chadima <jchadima@redhat.com> - 2.1.23-18
- update scriptlets - update scriptlets