summaryrefslogtreecommitdiffstats
path: root/abrt.spec.in
diff options
context:
space:
mode:
authorMiroslav Lichvar <mlichvar@redhat.com>2011-06-08 14:02:18 +0200
committerMiroslav Lichvar <mlichvar@redhat.com>2011-06-09 17:04:54 +0200
commiteef34b06afaaa645fe0619a9316d386b8c64267c (patch)
tree4d95110fb54686aec46c685fedd036016aa5bc34 /abrt.spec.in
parentfbad219de3b0ae47a4971cf78e906af68cc97bb7 (diff)
downloadabrt-eef34b06afaaa645fe0619a9316d386b8c64267c.zip
abrt-eef34b06afaaa645fe0619a9316d386b8c64267c.tar.gz
abrt-eef34b06afaaa645fe0619a9316d386b8c64267c.tar.xz
spec: fix service scriptlets
Don't enable abrtd on update. Don't call systemctl disable with SysV only services. Follow Fedora guidelines.
Diffstat (limited to 'abrt.spec.in')
-rw-r--r--abrt.spec.in23
1 files changed, 10 insertions, 13 deletions
diff --git a/abrt.spec.in b/abrt.spec.in
index 143e8b6..1808fa6 100644
--- a/abrt.spec.in
+++ b/abrt.spec.in
@@ -261,10 +261,10 @@ if [ $1 -eq 1 ]; then
fi
#systemd
%if %{?with_systemd}
-#if [ $1 -eq 1 ]; then
+if [ $1 -eq 1 ]; then
# Enable (but don't start) the units by default
/bin/systemctl enable abrtd.service >/dev/null 2>&1 || :
-#fi
+fi
%endif
%post addon-ccpp
@@ -291,8 +291,8 @@ fi
#systemd
%if %{?with_systemd}
if [ "$1" -eq "0" ] ; then
+ /bin/systemctl --no-reload disable abrtd.service > /dev/null 2>&1 || :
/bin/systemctl stop abrtd.service >/dev/null 2>&1 || :
- /bin/systemctl disable abrtd.service >/dev/null 2>&1 || :
fi
%endif
@@ -302,10 +302,10 @@ if [ "$1" -eq "0" ] ; then
/sbin/chkconfig --del abrt-ccpp
fi
#systemd (not tested):
-%if %{?with_systemd}
+%if 0
if [ "$1" -eq "0" ] ; then
+ /bin/systemctl --no-reload disable abrt-ccpp.service >/dev/null 2>&1 || :
/bin/systemctl stop abrt-ccpp.service >/dev/null 2>&1 || :
- /bin/systemctl disable abrt-ccpp.service >/dev/null 2>&1 || :
fi
%endif
@@ -315,20 +315,17 @@ if [ "$1" -eq "0" ] ; then
/sbin/chkconfig --del abrt-oops
fi
#systemd (not tested):
-%if %{?with_systemd}
+%if 0
if [ "$1" -eq "0" ] ; then
+ /bin/systemctl --no-reload abrt-oops.service >/dev/null 2>&1 || :
/bin/systemctl stop abrt-oops.service >/dev/null 2>&1 || :
- /bin/systemctl disable abrt-oops.service >/dev/null 2>&1 || :
fi
%endif
-%postun
-#systemd
%if %{?with_systemd}
-if [ $1 -ge 1 ] ; then
-# On upgrade, reload init system configuration if we changed unit files
- /bin/systemctl daemon-reload >/dev/null 2>&1 || :
-fi
+%postun
+/bin/systemctl daemon-reload >/dev/null 2>&1 || :
+
%endif
%post gui