diff --git a/mcelog.changes b/mcelog.changes index f937eff..73c1708 100644 --- a/mcelog.changes +++ b/mcelog.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Nov 23 21:36:36 UTC 2011 - crrodriguez@opensuse.org + +- Add systemd unit. + ------------------------------------------------------------------- Thu Aug 18 00:09:50 CEST 2011 - ro@suse.de diff --git a/mcelog.spec b/mcelog.spec index 4ec010e..ea9e5fd 100644 --- a/mcelog.spec +++ b/mcelog.spec @@ -22,7 +22,7 @@ Name: mcelog License: GPLv2+ Summary: Log Machine Check Events Version: 1.0pre3.6e4e2a000124 -Release: 6 +Release: 1 AutoReqProv: on ExclusiveArch: x86_64 BuildRequires: libesmtp-devel @@ -31,6 +31,7 @@ PreReq: %insserv_prereq %fillup_prereq Source: mcelog-%{version}.tar.bz2 Source1: mcelog.service Source2: mcelog.sysconfig +Source3: mcelog.systemd Source6: README.email_setup Patch1: email.patch Patch2: mcelog_invert_prefill_db_warning.patch @@ -78,6 +79,7 @@ install -m 644 %SOURCE2 $RPM_BUILD_ROOT/var/adm/fillup-templates/sysconfig.mcelo mkdir -p $RPM_BUILD_ROOT/%_docdir/%name install -m 644 %SOURCE6 $RPM_BUILD_ROOT/%_docdir/%name/README.email_setup install -m 644 lk10-mcelog.pdf $RPM_BUILD_ROOT/%_docdir/%name/lk10-mcelog.pdf +install -D -m 0644 %SOURCE3 %{buildroot}/lib/systemd/system/mcelog.service %clean rm -rf $RPM_BUILD_ROOT @@ -96,6 +98,7 @@ fi %files %defattr (-,root,root,755) +/lib/systemd/system/mcelog.service %{_mandir}/man8/* /usr/sbin/mcelog %config /etc/logrotate.d/mcelog diff --git a/mcelog.systemd b/mcelog.systemd new file mode 100644 index 0000000..bb89e95 --- /dev/null +++ b/mcelog.systemd @@ -0,0 +1,14 @@ +[Unit] +Description=Machine Check Exception Logging Daemon +After=syslog.target +ConditionVirtualization=false +ConditionPathExists=/dev/mcelog + +[Service] +EnvironmentFile=-/etc/sysconfig/mcelog +#warning: if this fails is due to a known kernel bug, fix that instead ! +ExecStart=/usr/sbin/mcelog --ignorenodev --daemon --foreground --email $MCELOG_ADMIN_EMAIL +StandardOutput=syslog + +[Install] +WantedBy=multi-user.target