Accepting request 93371 from home:elvigia:branches:Base:System

- Add systemd unit.

OBS-URL: https://build.opensuse.org/request/show/93371
OBS-URL: https://build.opensuse.org/package/show/Base:System/mcelog?expand=0&rev=20
This commit is contained in:
Andreas Jaeger 2011-11-24 16:57:46 +00:00 committed by Git OBS Bridge
parent 797faf31d3
commit ac70b88530
3 changed files with 23 additions and 1 deletions

View File

@ -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

View File

@ -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

14
mcelog.systemd Normal file
View File

@ -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