diff options
Diffstat (limited to 'doc')
-rw-r--r-- | doc/Makefile | 28 | ||||
-rw-r--r-- | doc/UserGuide | 2 | ||||
-rw-r--r-- | doc/ipmiutil.spec | 87 |
3 files changed, 71 insertions, 46 deletions
diff --git a/doc/Makefile b/doc/Makefile index ec426c2..616d3b1 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -46,12 +46,12 @@ CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = ${SHELL} /usr/dev/ipmiutil-3.1.3/missing --run aclocal-1.11 -AMTAR = ${SHELL} /usr/dev/ipmiutil-3.1.3/missing --run tar +ACLOCAL = ${SHELL} /home/public/cress/ipmiutil/src/missing --run aclocal-1.11 +AMTAR = ${SHELL} /home/public/cress/ipmiutil/src/missing --run tar AR = ar -AUTOCONF = ${SHELL} /usr/dev/ipmiutil-3.1.3/missing --run autoconf -AUTOHEADER = ${SHELL} /usr/dev/ipmiutil-3.1.3/missing --run autoheader -AUTOMAKE = ${SHELL} /usr/dev/ipmiutil-3.1.3/missing --run automake-1.11 +AUTOCONF = ${SHELL} /home/public/cress/ipmiutil/src/missing --run autoconf +AUTOHEADER = ${SHELL} /home/public/cress/ipmiutil/src/missing --run autoheader +AUTOMAKE = ${SHELL} /home/public/cress/ipmiutil/src/missing --run automake-1.11 AWK = gawk CC = gcc CCDEPMODE = depmode=gcc3 @@ -99,7 +99,7 @@ LIB_DIR = /usr/lib64 LIPO = LN_S = ln -s LTLIBOBJS = -MAKEINFO = ${SHELL} /usr/dev/ipmiutil-3.1.3/missing --run makeinfo +MAKEINFO = ${SHELL} /home/public/cress/ipmiutil/src/missing --run makeinfo MKDIR_P = /bin/mkdir -p NM = /usr/bin/nm -B NMEDIT = @@ -113,9 +113,9 @@ OTOOL64 = PACKAGE = ipmiutil PACKAGE_BUGREPORT = PACKAGE_NAME = ipmiutil -PACKAGE_STRING = ipmiutil 3.1.3 +PACKAGE_STRING = ipmiutil 3.1.4 PACKAGE_TARNAME = ipmiutil -PACKAGE_VERSION = 3.1.3 +PACKAGE_VERSION = 3.1.4 PATH_SEPARATOR = : PKG_DIR = /root/rpmbuild RANLIB = ranlib @@ -127,11 +127,11 @@ SHR_LINK = libipmiutil.so.1 STRIP = strip SUBDIR_S = doc scripts lib util SYSTEMD_DIR = /usr/share/ipmiutil -VERSION = 3.1.3 -abs_builddir = /usr/dev/ipmiutil-3.1.3/doc -abs_srcdir = /usr/dev/ipmiutil-3.1.3/doc -abs_top_builddir = /usr/dev/ipmiutil-3.1.3 -abs_top_srcdir = /usr/dev/ipmiutil-3.1.3 +VERSION = 3.1.4 +abs_builddir = /home/public/cress/ipmiutil/src/doc +abs_srcdir = /home/public/cress/ipmiutil/src/doc +abs_top_builddir = /home/public/cress/ipmiutil/src +abs_top_srcdir = /home/public/cress/ipmiutil/src ac_ct_CC = gcc ac_ct_DUMPBIN = am__include = include @@ -159,7 +159,7 @@ host_vendor = redhat htmldir = ${docdir} includedir = ${prefix}/include infodir = ${datarootdir}/info -install_sh = ${SHELL} /usr/dev/ipmiutil-3.1.3/install-sh +install_sh = ${SHELL} /home/public/cress/ipmiutil/src/install-sh libdir = ${exec_prefix}/lib libexecdir = ${exec_prefix}/libexec localedir = ${datarootdir}/locale diff --git a/doc/UserGuide b/doc/UserGuide index 5c35b6b..a09f884 100644 --- a/doc/UserGuide +++ b/doc/UserGuide @@ -1,6 +1,6 @@ IPMIUTIL USER GUIDE - VERSION 3.1.3 + VERSION 3.1.4 An easy-to-use IPMI server management utility diff --git a/doc/ipmiutil.spec b/doc/ipmiutil.spec index 3587484..5d80dab 100644 --- a/doc/ipmiutil.spec +++ b/doc/ipmiutil.spec @@ -3,7 +3,7 @@ # Copyright (c) 2012 Andy Cress # Name: ipmiutil -Version: 3.1.3 +Version: 3.1.4 Release: 1%{?dist} Summary: Easy-to-use IPMI server management utilities License: BSD @@ -207,17 +207,19 @@ rm -rf %{buildroot} %post /sbin/ldconfig # POST_INSTALL, $1 = 1 if rpm -i, $1 = 2 if rpm -U -if [ "$1" = "1" ] -then - # doing rpm -i, first time - vardir=%{_var}/lib/%{name} - scr_dir=%{_datadir}/%{name} +vardir=%{_var}/lib/%{name} +scr_dir=%{_datadir}/%{name} +# Install right scripts/service files no matter install or upgrade %if 0%{?req_systemd} %service_add_post ipmi_port.service ipmiutil_evt.service ipmiutil_asy.service ipmiutil_wdt.service %else if [ -x /bin/systemctl ] && [ -d %{unit_dir} ]; then - echo "IINITDIR=%{init_dir}" >>%{_datadir}/%{name}/ipmiutil.env + # Replace if exists, append if not. + # Use # as the sed delimiter to prevent handling slash in the path. + grep -q 'IINITDIR' %{_datadir}/%{name}/ipmiutil.env \ + && sed -i 's#^IINITDIR=.*#IINITDIR=%{init_dir}#' %{_datadir}/%{name}/ipmiutil.env \ + || echo "IINITDIR=%{init_dir}" >> %{_datadir}/%{name}/ipmiutil.env cp -f ${scr_dir}/ipmiutil_evt.service %{unit_dir} cp -f ${scr_dir}/ipmiutil_asy.service %{unit_dir} cp -f ${scr_dir}/ipmiutil_wdt.service %{unit_dir} @@ -232,6 +234,8 @@ then fi %endif +if [ "$1" = "1" ] +then # Test whether an IPMI interface is known to the motherboard IPMIret=1 which dmidecode >/dev/null 2>&1 && IPMIret=0 @@ -290,7 +294,7 @@ else fi fi fi -%if 0%{?fedora} >= 18 +%if 0%{?fedora} >= 18 || 0%{?rhel} >= 7 %systemd_post ipmiutil_evt.service %systemd_post ipmiutil_asy.service %systemd_post ipmiutil_wdt.service @@ -306,12 +310,15 @@ then %else if [ -x /bin/systemctl ]; then if [ -f %{unit_dir}/ipmiutil_evt.service ]; then -%if 0%{?fedora} >= 18 +%if 0%{?fedora} >= 18 || 0%{?rhel} >= 7 %systemd_preun ipmiutil_evt.service %systemd_preun ipmiutil_asy.service %systemd_preun ipmiutil_wdt.service %systemd_preun ipmi_port.service %else + ret=1 + which systemctl >/dev/null 2>&1 && ret=0 + if [ $ret -eq 0 ]; then systemctl disable ipmi_port.service >/dev/null 2>&1 || : systemctl disable ipmiutil_evt.service >/dev/null 2>&1 || : systemctl disable ipmiutil_asy.service >/dev/null 2>&1 || : @@ -320,6 +327,7 @@ then systemctl stop ipmiutil_asy.service >/dev/null 2>&1 || : systemctl stop ipmiutil_wdt.service >/dev/null 2>&1 || : systemctl stop ipmi_port.service >/dev/null 2>&1 || : + fi %endif fi else @@ -345,36 +353,53 @@ fi %postun # after uninstall, $1 = 1 if update, $1 = 0 if rpm -e /sbin/ldconfig +# Remove files from scr_dir only when uninstall +if [ "$1" = "0" ] +then + if [ -x /bin/systemctl ] && [ -d %{unit_dir} ]; then + if [ -f %{unit_dir}/ipmiutil_evt.service ]; then + rm -f %{unit_dir}/ipmiutil_evt.service 2>/dev/null || : + rm -f %{unit_dir}/ipmiutil_asy.service 2>/dev/null || : + rm -f %{unit_dir}/ipmiutil_wdt.service 2>/dev/null || : + rm -f %{unit_dir}/ipmi_port.service 2>/dev/null || : + fi + else + if [ -f %{init_dir}/ipmiutil_evt.service ]; then + rm -f %{init_dir}/ipmiutil_wdt 2>/dev/null || : + rm -f %{init_dir}/ipmiutil_asy 2>/dev/null || : + rm -f %{init_dir}/ipmiutil_evt 2>/dev/null || : + rm -f %{init_dir}/ipmi_port 2>/dev/null || : + fi + fi +fi + %if 0%{?req_systemd} %service_del_postun ipmi_port.service ipmiutil_evt.service ipmiutil_asy.service ipmiutil_wdt.service %else -if [ -x /bin/systemctl ]; then -%if 0%{?fedora} >= 18 -%systemd_postun_with_restart ipmi_port.service +%if 0%{?fedora} >= 18 || 0%{?rhel} >= 7 +%systemd_postun_with_restart ipmi_port.service +%systemd_postun_with_restart ipmiutil_evt.service +%systemd_postun_with_restart ipmiutil_asy.service +%systemd_postun_with_restart ipmiutil_wdt.service %else - systemctl daemon-reload || : - if [ $1 -ge 1 ] ; then - # Package upgrade, not uninstall - systemctl try-restart ipmi_port.service || : - fi -%endif - if [ -f %{unit_dir}/ipmiutil_evt.service ]; then - rm -f %{unit_dir}/ipmiutil_evt.service 2>/dev/null || : - rm -f %{unit_dir}/ipmiutil_asy.service 2>/dev/null || : - rm -f %{unit_dir}/ipmiutil_wdt.service 2>/dev/null || : - rm -f %{unit_dir}/ipmi_port.service 2>/dev/null || : - fi -else - if [ -f %{init_dir}/ipmiutil_evt.service ]; then - rm -f %{init_dir}/ipmiutil_wdt 2>/dev/null || : - rm -f %{init_dir}/ipmiutil_asy 2>/dev/null || : - rm -f %{init_dir}/ipmiutil_evt 2>/dev/null || : - rm -f %{init_dir}/ipmi_port 2>/dev/null || : - fi +ret=1 +which systemctl >/dev/null 2>&1 && ret=0 +if [ $ret -eq 0 ]; then + systemctl daemon-reload || : + if [ $1 -ge 1 ]; then + # Package upgrade, not uninstall + systemctl try-restart ipmi_port.service || : + systemctl try-restart ipmiutil_evt.service || : + systemctl try-restart ipmiutil_asy.service || : + systemctl try-restart ipmiutil_wdt.service || : + fi fi %endif +%endif %changelog +* Mon Oct 29 2018 Andrew Cress <arcress at users.sourceforge.net> 3.1.3-1 +- clean up systemd scripts with macros, fix update for systemd (Aska Wu) * Fri Jul 20 2018 Andrew Cress <arcress at users.sourceforge.net> 3.1.2-1 - resolve doubly-defined Group for Fedora * Mon Jun 29 2015 Andrew Cress <arcress at users.sourceforge.net> 2.9.7-1 |