From 037888d932aefd7f359bc6c3006e4e87cd09ec4aa00fcf94bd62d19f75b4bde0 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Sun, 21 Nov 2021 11:05:26 +0000 Subject: [PATCH] Accepting request 928352 from home:seife:branches:systemsmanagement try to fix postinstall scripts (they are totally broken and useless anyway, but at least fix obvious errors) OBS-URL: https://build.opensuse.org/request/show/928352 OBS-URL: https://build.opensuse.org/package/show/systemsmanagement/ipmiutil?expand=0&rev=45 --- ipmiutil.changes | 6 ++++++ ipmiutil.spec | 12 ++++++++---- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/ipmiutil.changes b/ipmiutil.changes index 9875a22..eb58ebe 100644 --- a/ipmiutil.changes +++ b/ipmiutil.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Sun Oct 31 09:23:58 UTC 2021 - Stefan Seyfried + +- try to fix postinstall scripts (they are totally broken and + useless anyway, but at least fix obvious errors) + ------------------------------------------------------------------- Fri Oct 15 12:12:08 UTC 2021 - Johannes Segitz diff --git a/ipmiutil.spec b/ipmiutil.spec index 287a453..9e97145 100644 --- a/ipmiutil.spec +++ b/ipmiutil.spec @@ -26,10 +26,10 @@ License: BSD-3-Clause Group: System/Management URL: http://ipmiutil.sourceforge.net Source: https://sourceforge.net/projects/ipmiutil/files/%{name}-%{version}.tar.gz -Patch0: harden_ipmi_port.service.patch -Patch1: harden_ipmiutil_asy.service.patch -Patch2: harden_ipmiutil_evt.service.patch -Patch3: harden_ipmiutil_wdt.service.patch +Patch0: harden_ipmi_port.service.patch +Patch1: harden_ipmiutil_asy.service.patch +Patch2: harden_ipmiutil_evt.service.patch +Patch3: harden_ipmiutil_wdt.service.patch BuildRequires: autoconf BuildRequires: automake BuildRequires: gcc @@ -178,6 +178,7 @@ autoreconf -fiv %post devel -p /sbin/ldconfig %postun devel -p /sbin/ldconfig + %pre %service_add_pre ipmi_port.service ipmiutil_evt.service ipmiutil_asy.service ipmiutil_wdt.service @@ -196,8 +197,10 @@ then IPMIret=1 which dmidecode >/dev/null 2>&1 && IPMIret=0 if [ $IPMIret -eq 0 ]; then + IPMIret=1 %{_sbindir}/dmidecode |grep -q IPMI && IPMIret=0 if [ $IPMIret -eq 0 ]; then + IPMIret=1 # Run some ipmiutil command to see if any IPMI interface works. # Some may not have IPMI on the motherboard, so need to check, but # some kernels may have IPMI driver partially loaded, which breaks this @@ -239,6 +242,7 @@ else IPMIret=1 which dmidecode >/dev/null 2>&1 && IPMIret=0 if [ $IPMIret -eq 0 ]; then + IPMIret=1 %{_sbindir}/dmidecode |grep -q IPMI && IPMIret=0 if [ $IPMIret -eq 0 ]; then if [ -d %{_sysconfdir}/cron.daily ]; then