summaryrefslogtreecommitdiff
path: root/system/watchdog/watchdog-5.3.1-slackware.diff
blob: 0b55f1ad15e1ba468119c2001ddd3ba435cee289 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
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
@@ -48,6 +48,9 @@
 	elif [ -x /etc/init.d/networking ]; then
 		# Debian
 		/etc/init.d/networking stop
+	elif [ -x /etc/rc.d/rc.inet1 ]; then
+		# Slackware
+		/etc/rc.d/rc.inet1 stop
 	else
 		ifconfig |
 		awk '/Link/ {print $1}' |
@@ -78,7 +81,10 @@
     /etc/init.d/networking start
 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
 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
@@ -0,0 +1,43 @@
+#!/bin/sh
+#
+# /etc/rc.d/rc.watchdog
+#
+# Start/stop/restart the watchdog timer service.
+
+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: /usr/src/linux/Documentation/watchdog/watchdog-api.txt"
+    exit 0
+  fi
+  if [ -x /usr/sbin/watchdog -a -r /etc/watchdog.conf ]; then
+    echo "Starting the watchdog timer service:  /usr/sbin/watchdog"
+    /usr/sbin/watchdog
+  fi
+}
+
+watchdog_stop() {
+  killall watchdog
+}
+
+watchdog_restart() {
+  watchdog_stop
+  sleep 10 # can take a while to die
+  watchdog_start
+}
+
+case "$1" in
+'start')
+  watchdog_start
+  ;;
+'stop')
+  watchdog_stop
+  ;;
+'restart')
+  watchdog_restart
+  ;;
+*)
+  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		=