summaryrefslogtreecommitdiffstats
path: root/abrt.spec.in
diff options
context:
space:
mode:
authorMiroslav Lichvar <mlichvar@redhat.com>2011-06-08 14:45:24 +0200
committerMiroslav Lichvar <mlichvar@redhat.com>2011-06-09 17:05:35 +0200
commite495dd05e5c938008e9a1126985710b8e22d9ea6 (patch)
treef95deffc7a2c13559bb989213b034ad1e96a3f4c /abrt.spec.in
parenteef34b06afaaa645fe0619a9316d386b8c64267c (diff)
downloadabrt-e495dd05e5c938008e9a1126985710b8e22d9ea6.tar.gz
abrt-e495dd05e5c938008e9a1126985710b8e22d9ea6.tar.xz
abrt-e495dd05e5c938008e9a1126985710b8e22d9ea6.zip
add abrt-oops systemd service (trac#287)
Diffstat (limited to 'abrt.spec.in')
-rw-r--r--abrt.spec.in18
1 files changed, 15 insertions, 3 deletions
diff --git a/abrt.spec.in b/abrt.spec.in
index 1808fa64..8b622429 100644
--- a/abrt.spec.in
+++ b/abrt.spec.in
@@ -281,7 +281,13 @@ fi
if [ $1 -eq 1 ]; then
/sbin/chkconfig --add abrt-oops
fi
-#systemd: TODO
+#systemd
+%if %{?with_systemd}
+if [ $1 -eq 1 ]; then
+ # Enable (but don't start) the units by default
+ /bin/systemctl enable abrt-oops.service >/dev/null 2>&1 || :
+fi
+%endif
%preun
if [ "$1" -eq "0" ] ; then
@@ -314,8 +320,8 @@ if [ "$1" -eq "0" ] ; then
service abrt-oops stop >/dev/null 2>&1
/sbin/chkconfig --del abrt-oops
fi
-#systemd (not tested):
-%if 0
+#systemd
+%if %{?with_systemd}
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 || :
@@ -326,6 +332,9 @@ fi
%postun
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
+%postun addon-kerneloops
+/bin/systemctl daemon-reload >/dev/null 2>&1 || :
+
%endif
%post gui
@@ -447,6 +456,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
%config(noreplace) %{_sysconfdir}/%{name}/plugins/Kerneloops.conf
%{_sysconfdir}/%{name}/events/report_Kerneloops.xml
%config(noreplace) %{_sysconfdir}/%{name}/events.d/koops_events.conf
+%if %{?with_systemd}
+/lib/systemd/system/abrt-oops.service
+%endif
%{_initrddir}/abrt-oops
%{_mandir}/man*/abrt-action-kerneloops.*
%{_bindir}/abrt-dump-oops