summaryrefslogtreecommitdiff
path: root/system
diff options
context:
space:
mode:
authorMenno E. Duursma <druiloor@zonnet.nl>2010-05-11 19:46:45 +0200
committerRobby Workman <rworkman@slackbuilds.org>2010-05-11 19:46:45 +0200
commit50429056150db116ab36557821d18a3bfd197c44 (patch)
treec1c524a379b2d21383db4215e44545532ec48ebe /system
parent337709e77376bec94f384e510b21b4398be6f2df (diff)
downloadslackbuilds-50429056150db116ab36557821d18a3bfd197c44.tar.gz
system/watchdog: Updated for version 5.3.1
Diffstat (limited to 'system')
-rw-r--r--system/watchdog/README16
-rw-r--r--system/watchdog/doinst.sh4
-rw-r--r--system/watchdog/slack-desc15
-rw-r--r--system/watchdog/watchdog-5.4-slackware.diff (renamed from system/watchdog/watchdog-5.3.1-slackware.diff)37
-rw-r--r--system/watchdog/watchdog.SlackBuild20
-rw-r--r--system/watchdog/watchdog.info4
6 files changed, 50 insertions, 46 deletions
diff --git a/system/watchdog/README b/system/watchdog/README
index c5732210bc..f142f14f04 100644
--- a/system/watchdog/README
+++ b/system/watchdog/README
@@ -3,13 +3,15 @@ Linux watchdog timer daemon
This service periodically writes to /dev/watchdog - in the event
of it _not_ being able to do so, Linux may reset the system.
-For this to work a kernel driver for the aformentioned device needs
+For this to work, a kernel driver for the aformentioned device needs
to be loaded. The module may be found in:
/lib/modules/$(uname -r)/kernel/drivers/char/watchdog
It can be configured to try and fix things (such as networking)
-before triggering a reboot. See the examples included in:
- /usr/doc/watchdog-$VERSION/examples
+before triggering a reboot. As 'repair.sh' may be able to do.
+See the examples included in:
+
+ /usr/doc/watchdog-5.4/examples
This package also contains the 'wd_keepalive' program by Marcel Jansen
which "can be run during critical periods when the normal watcdog
@@ -22,8 +24,8 @@ The watchdog was written and is maintained by Michael Meskes
To enable the watchdog: make sure a kernel module gets loaded for it
(at boot) such as the 'softdog' or an actual hardware driver...
Then add the following to rc.local:
+ # Start the watchdog timer deamon
+ if [ -x /etc/rc.d/rc.watchdog ]; then
+ /etc/rc.d/rc.watchdog start
+ fi
- # Start the watchdog timer deamon
- if [ -x /etc/rc.d/rc.watchdog ]; then
- /etc/rc.d/rc.watchdog start
- fi
diff --git a/system/watchdog/doinst.sh b/system/watchdog/doinst.sh
index 3cf6ace364..a75147f719 100644
--- a/system/watchdog/doinst.sh
+++ b/system/watchdog/doinst.sh
@@ -1,11 +1,11 @@
config()
{
NEW="$1"
- OLD="`dirname $NEW`/`basename $NEW .new`"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
# If there's no config file by that name, mv it over:
if [ ! -r $OLD ]; then
mv $NEW $OLD
- elif [ "`cat $OLD | md5sum`" = "`cat $NEW | md5sum`" ]; then
+ elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
# toss the redundant copy
rm $NEW
fi
diff --git a/system/watchdog/slack-desc b/system/watchdog/slack-desc
index 7614694f27..1a7557f1d5 100644
--- a/system/watchdog/slack-desc
+++ b/system/watchdog/slack-desc
@@ -1,10 +1,19 @@
-watchdog: Linux watchdog timer daemon
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler-----------------------------------------------------|
+watchdog: watchdog (Linux watchdog timer daemon)
watchdog:
-watchdog: This service periodically writes to /dev/watchdog in the event
+watchdog: This service periodically writes to /dev/watchdog - in the event
watchdog: of it _not_ being able to do so; Linux may reset the system.
watchdog:
watchdog: It can be configured to try and fix things (such as networking)
watchdog: before going about triggering reboot.
watchdog:
-watchdog: The watchdog was written, and is maintained by Michael Meskes
+watchdog: The watchdog was written and is maintained by Michael Meskes
watchdog: (based on example code by Alan Cox).
+watchdog:
diff --git a/system/watchdog/watchdog-5.3.1-slackware.diff b/system/watchdog/watchdog-5.4-slackware.diff
index 0b55f1ad15..fc2caca4e4 100644
--- a/system/watchdog/watchdog-5.3.1-slackware.diff
+++ b/system/watchdog/watchdog-5.4-slackware.diff
@@ -1,6 +1,6 @@
-diff -urN watchdog-5.3.1.std/examples/repair.sh watchdog-5.3.1/examples/repair.sh
---- watchdog-5.3.1.std/examples/repair.sh 2007-02-22 11:49:16.000000000 +0100
-+++ watchdog-5.3.1/examples/repair.sh 2007-06-10 19:38:14.000000000 +0200
+diff -Nur watchdog-5.4.orig/examples/repair.sh watchdog-5.4/examples/repair.sh
+--- watchdog-5.4.orig/examples/repair.sh 2006-07-30 05:50:06.000000000 -0500
++++ watchdog-5.4/examples/repair.sh 2008-03-02 12:58:08.086346303 -0600
@@ -48,6 +48,9 @@
elif [ -x /etc/init.d/networking ]; then
# Debian
@@ -11,21 +11,19 @@ diff -urN watchdog-5.3.1.std/examples/repair.sh watchdog-5.3.1/examples/repair.s
else
ifconfig |
awk '/Link/ {print $1}' |
-@@ -78,7 +81,10 @@
- /etc/init.d/networking start
+@@ -79,6 +82,9 @@
elif [ -x /etc/rc.d/init.d/network ]; then
# Redhat
-- /etc/rc.d/init.d/network start
-+ /etc/rc.d/inet1 start
-+elif [ -x /etc/rc.d/init.d/network ]; then
-+ # Slackware
-+ /etc/rc.d/inet1 start
+ /etc/rc.d/init.d/network start
++elif [ -x /etc/rc.d/rc.inet1 ]; then
++ # Slackware
++ /etc/rc.d/rc.inet1 start
else
echo "Couldn't find network script to relaunch networking. Please edit $0" | logger -i -t repair -p daemon.info
exit $1
-diff -urN watchdog-5.3.1.std/rc.watchdog.slackware watchdog-5.3.1/rc.watchdog.slackware
---- watchdog-5.3.1.std/rc.watchdog.slackware 1970-01-01 01:00:00.000000000 +0100
-+++ watchdog-5.3.1/rc.watchdog.slackware 2007-06-10 19:38:14.000000000 +0200
+diff -Nur watchdog-5.4.orig/rc.watchdog.slackware watchdog-5.4/rc.watchdog.slackware
+--- watchdog-5.4.orig/rc.watchdog.slackware 1969-12-31 18:00:00.000000000 -0600
++++ watchdog-5.4/rc.watchdog.slackware 2008-03-02 12:58:08.086346303 -0600
@@ -0,0 +1,43 @@
+#!/bin/sh
+#
@@ -36,7 +34,7 @@ diff -urN watchdog-5.3.1.std/rc.watchdog.slackware watchdog-5.3.1/rc.watchdog.sl
+watchdog_start() {
+ if [ ! -e /dev/watchdog ]; then
+ echo "$0: No /dev/watchdog device node seems to exist on this system."
-+ echo "$0: Probably here a kernel module needs to be loaded, please see:"
++ echo "$0: A kernel module probably needs to be loaded; please see:"
+ echo "$0: /usr/src/linux/Documentation/watchdog/watchdog-api.txt"
+ exit 0
+ fi
@@ -70,14 +68,3 @@ diff -urN watchdog-5.3.1.std/rc.watchdog.slackware watchdog-5.3.1/rc.watchdog.sl
+ echo $"Usage: $0 {start|stop|restart}"
+esac
+
-diff -urN watchdog-5.3.1.std/watchdog.conf watchdog-5.3.1/watchdog.conf
---- watchdog-5.3.1.std/watchdog.conf 2007-02-22 11:49:16.000000000 +0100
-+++ watchdog-5.3.1/watchdog.conf 2007-06-10 19:39:57.000000000 +0200
-@@ -15,6 +15,7 @@
- # To get the real size, check how large the pagesize is on your machine.
- #min-memory = 1
-
-+# An example (script) is provided as: examples/repair.sh
- #repair-binary = /usr/sbin/repair
- #test-binary =
- #test-timeout =
diff --git a/system/watchdog/watchdog.SlackBuild b/system/watchdog/watchdog.SlackBuild
index 6c4b326445..ae901d5401 100644
--- a/system/watchdog/watchdog.SlackBuild
+++ b/system/watchdog/watchdog.SlackBuild
@@ -3,14 +3,12 @@
# Slackware build script for watchdog
# Written by Menno E. Duursma <druiloor@zonnet.nl>
-# Exit on most errors
-set -e
-
PRGNAM=watchdog
-VERSION=5.3.1
+VERSION=5.4
ARCH=${ARCH:-i486}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
@@ -22,17 +20,19 @@ elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
fi
+set -e # Exit on most errors
+
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
-tar -xzvf $CWD/${PRGNAM}_${VERSION}.tar.gz
+tar xvf $CWD/${PRGNAM}-${VERSION}.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
chmod -R u+w,go+r-w,a-s .
# Apply the Slackware support scripts patch
-cat $CWD/$PRGNAM-$VERSION-slackware.diff | patch -p1 --verbose
+patch -p1 < $CWD/$PRGNAM-$VERSION-slackware.diff
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
@@ -59,7 +59,7 @@ cp -a [A-Z][A-Z]* ChangeLog examples $PKG/usr/doc/$PRGNAM-$VERSION
cp -a debian/README.debian $PKG/usr/doc/$PRGNAM-$VERSION
# Also, include the SlackBuild script in the documentation directory
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
-cat $CWD/README > $PKG/usr/doc/$PRGNAM-$VERSION/README$TAG
+cat $CWD/README > $PKG/usr/doc/$PRGNAM-$VERSION/README.SBo
# Move config to .new; let doinst.sh handle it further
mv $PKG/etc/$PRGNAM.conf $PKG/etc/$PRGNAM.conf.new
@@ -74,3 +74,9 @@ cat $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz
+
+# Clean up the extra stuff:
+if [ "$1" = "--cleanup" ]; then
+ rm -rf $TMP/$PRGNAM-$VERSION
+ rm -rf $PKG
+fi
diff --git a/system/watchdog/watchdog.info b/system/watchdog/watchdog.info
index d27905f543..0e8001b29b 100644
--- a/system/watchdog/watchdog.info
+++ b/system/watchdog/watchdog.info
@@ -1,8 +1,8 @@
PRGNAM="watchdog"
VERSION="5.3.1"
HOMEPAGE="http://sourceforge.net/projects/watchdog"
-DOWNLOAD="http://www.ibiblio.org/pub/Linux/system/daemons/watchdog/watchdog_5.3.1.tar.gz"
-MD5SUM="ba97ddce396bfccd8d409bc3141d7ef4"
+DOWNLOAD="http://www.ibiblio.org/pub/Linux/system/daemons/watchdog/watchdog-5.4.tar.gz"
+MD5SUM="66480128b9dabcced2e4c8db3e60fa50"
MAINTAINER="Menno E. Duursma"
EMAIL="druiloor@zonnet.nl"
APPROVED="rworkman"