From 0c0696b0d3ccb0cd8940b4d4e033fc63d06679b9 Mon Sep 17 00:00:00 2001 From: Jan Safranek Date: Mon, 27 Aug 2012 13:14:34 +0200 Subject: [PATCH] Fixed starting ipmievd under systemd Resolves: #819234 --- ipmievd.service | 2 +- ipmitool-1.8.11-systemd.patch | 14 ++++++++++++++ ipmitool.spec | 7 ++++++- 3 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 ipmitool-1.8.11-systemd.patch diff --git a/ipmievd.service b/ipmievd.service index 82b5929..88c22c2 100644 --- a/ipmievd.service +++ b/ipmievd.service @@ -7,7 +7,7 @@ After=ipmi.service EnvironmentFile=-/etc/sysconfig/ipmievd ExecStart=/usr/sbin/ipmievd $IPMIEVD_OPTIONS Type=forking -PIDFile=/var/run/ipmievd.pid0 +PIDFile=/var/run/ipmievd.pid [Install] WantedBy=multi-user.target diff --git a/ipmitool-1.8.11-systemd.patch b/ipmitool-1.8.11-systemd.patch new file mode 100644 index 0000000..ea50d46 --- /dev/null +++ b/ipmitool-1.8.11-systemd.patch @@ -0,0 +1,14 @@ +diff -up ipmitool-1.8.12/lib/helper.c.systemd ipmitool-1.8.12/lib/helper.c +--- ipmitool-1.8.12/lib/helper.c.systemd 2012-08-13 14:24:47.391037471 +0200 ++++ ipmitool-1.8.12/lib/helper.c 2012-08-13 14:24:53.088016793 +0200 +@@ -549,10 +549,6 @@ ipmi_start_daemon(struct ipmi_intf *intf + sigset_t sighup; + #endif + +- /* if we are started from init no need to become daemon */ +- if (getppid() == 1) +- return; +- + #ifdef SIGHUP + sigemptyset(&sighup); + sigaddset(&sighup, SIGHUP); diff --git a/ipmitool.spec b/ipmitool.spec index 3f5508b..e9006af 100644 --- a/ipmitool.spec +++ b/ipmitool.spec @@ -1,7 +1,7 @@ Name: ipmitool Summary: Utility for IPMI control Version: 1.8.12 -Release: 1%{?dist} +Release: 2%{?dist} License: BSD Group: System Environment/Base URL: http://ipmitool.sourceforge.net/ @@ -20,6 +20,7 @@ Provides: OpenIPMI-tools = 2.0.14-3 Patch1: ipmitool-1.8.10-ipmievd-init.patch Patch2: ipmitool-1.8.10-ipmievd-condrestart.patch Patch3: ipmitool-1.8.11-remove-umask0.patch +Patch4: ipmitool-1.8.11-systemd.patch %description This package contains a utility for interfacing with devices that support @@ -42,6 +43,7 @@ setting LAN configuration, and chassis power control. %patch1 -p1 -b .ipmievd-init %patch2 -p0 -b .condrestart %patch3 -p1 -b .umask +%patch4 -p1 -b .systemd for f in AUTHORS ChangeLog; do iconv -f iso-8859-1 -t utf8 < ${f} > ${f}.utf8 @@ -103,6 +105,9 @@ fi %changelog +* Mon Aug 27 2012 Jan Safranek - 1.8.12-2 +- Fixed starting ipmievd under systemd (#819234). + * Fri Aug 10 2012 Jan Safranek - 1.8.12-1 - update to ipmitool-1.8.12