summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/Makefile28
-rwxr-xr-xscripts/ipmiutil_wdt46
2 files changed, 30 insertions, 44 deletions
diff --git a/scripts/Makefile b/scripts/Makefile
index 7ac10e6..6818ee0 100644
--- a/scripts/Makefile
+++ b/scripts/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.0.1/missing --run aclocal-1.11
-AMTAR = ${SHELL} /usr/dev/ipmiutil-3.0.1/missing --run tar
+ACLOCAL = ${SHELL} /usr/dev/ipmiutil-3.0.2/missing --run aclocal-1.11
+AMTAR = ${SHELL} /usr/dev/ipmiutil-3.0.2/missing --run tar
AR = ar
-AUTOCONF = ${SHELL} /usr/dev/ipmiutil-3.0.1/missing --run autoconf
-AUTOHEADER = ${SHELL} /usr/dev/ipmiutil-3.0.1/missing --run autoheader
-AUTOMAKE = ${SHELL} /usr/dev/ipmiutil-3.0.1/missing --run automake-1.11
+AUTOCONF = ${SHELL} /usr/dev/ipmiutil-3.0.2/missing --run autoconf
+AUTOHEADER = ${SHELL} /usr/dev/ipmiutil-3.0.2/missing --run autoheader
+AUTOMAKE = ${SHELL} /usr/dev/ipmiutil-3.0.2/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.0.1/missing --run makeinfo
+MAKEINFO = ${SHELL} /usr/dev/ipmiutil-3.0.2/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.0.1
+PACKAGE_STRING = ipmiutil 3.0.2
PACKAGE_TARNAME = ipmiutil
-PACKAGE_VERSION = 3.0.1
+PACKAGE_VERSION = 3.0.2
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.0.1
-abs_builddir = /usr/dev/ipmiutil-3.0.1/scripts
-abs_srcdir = /usr/dev/ipmiutil-3.0.1/scripts
-abs_top_builddir = /usr/dev/ipmiutil-3.0.1
-abs_top_srcdir = /usr/dev/ipmiutil-3.0.1
+VERSION = 3.0.2
+abs_builddir = /usr/dev/ipmiutil-3.0.2/scripts
+abs_srcdir = /usr/dev/ipmiutil-3.0.2/scripts
+abs_top_builddir = /usr/dev/ipmiutil-3.0.2
+abs_top_srcdir = /usr/dev/ipmiutil-3.0.2
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.0.1/install-sh
+install_sh = ${SHELL} /usr/dev/ipmiutil-3.0.2/install-sh
libdir = ${exec_prefix}/lib
libexecdir = ${exec_prefix}/libexec
localedir = ${datarootdir}/locale
diff --git a/scripts/ipmiutil_wdt b/scripts/ipmiutil_wdt
index b3ffcf1..d253ec3 100755
--- a/scripts/ipmiutil_wdt
+++ b/scripts/ipmiutil_wdt
@@ -20,18 +20,13 @@
# Description: Init script to enable and reset ipmiutil watchdog timer via cron
### END INIT INFO
#
-#if [ -f /etc/init.d/functions ]; then
-# Source function library.
-#. /etc/init.d/functions
-#fi
name=ipmiutil_wdt
prog="/usr/bin/ipmiutil wdt"
wdtcron=/etc/cron.d/wdt
LOCKFILE=/var/lock/subsys/$name
wdtlog=/var/log/$name
-#tmpcron=/tmp/wdtcron.$$
-# tmpcron2=/tmp/wdtcron2.$$
+wdtsec=150 # default 150 seconds for watchdog timeout (2*60 + 30)
start() {
echo -n "Starting $prog: "
@@ -48,26 +43,19 @@ start() {
echo "No ipmi driver loaded, aborting."
RETVAL=1
else
- # configure the watchdog for a 90 second timeout
- $prog -e -t 90 >$wdtlog
+ # configure the watchdog for a 150 second timeout
+ $prog -e -t $wdtsec >$wdtlog
RETVAL=$?
- if [ $RETVAL -eq 0 ]
- then
- # restart the watchdog every 60 seconds via crontab (skip)
- # cat - <<%%% >$tmpcron
-#* * * * * $prog -r
-#%%%
- # crontab $tmpcron
- # RETVAL=$?
- # restart the watchdog every 60 seconds via /etc/cron.d
- cat - <<%%% >$wdtcron
+ if [ $RETVAL -eq 0 ]; then
+ # restart the watchdog every 60 seconds via /etc/cron.d
+ cat - <<%%% >$wdtcron
* * * * * root $prog -r >/dev/null
%%%
# make crond re-read the /etc/cron.d
- $crond_sh restart >>$wdtlog
+ $restart_cron >>$wdtlog
touch $LOCKFILE
fi
- fi
+ fi
echo
return $RETVAL
}
@@ -79,16 +67,13 @@ stop() {
$prog -d >>$wdtlog
RETVAL=$?
# now remove the wdt cron job
- # crontab -l >$tmpcron
- # grep -v $prog $tmpcron |grep -v "^#" >$tmpcron2
- # crontab $tmpcron2
- rm -f $wdtcron
+ rm -f $wdtcron
# make crond re-read the /etc/cron.d
- $crond_sh restart >>$wdtlog
+ $restart_cron >>$wdtlog
rm -f ${LOCKFILE}
echo
return $RETVAL
-}
+}
restart() {
stop
@@ -113,12 +98,13 @@ get_status() {
}
# Begin mainline script here
-if [ -f /etc/redhat-release ]
-then
- crond_sh=/etc/init.d/crond
+if [ -x /bin/systemctl ]; then
+ restart_cron='systemctl restart crond.service'
+elif [ -f /etc/redhat-release ]; then
+ restart_cron='/etc/init.d/crond restart'
else
# SuSE, MontaVista, etc.
- crond_sh=/etc/init.d/cron
+ restart_cron='/etc/init.d/cron restart'
fi
if [ ! -d /var/lock/subsys ]; then
LOCKFILE=/var/run/$name.pid