blob: 3ba11ffe551fb2412ee1ed3ed8028ece69588204 (
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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
|
From 0ef1a95b220c7e110da950e5cc544c50c25b1bc6 Mon Sep 17 00:00:00 2001
From: Li xin <lixin.fnst@cn.fujitsu.com>
Date: Tue, 18 Nov 2014 18:11:56 +0900
Subject: [PATCH 4/5] rarpd.init : add new init file
Signed-off-by: Li Xin <lixin.fnst@cn.fujitsu.com>
---
rarpd.init | 96 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 96 insertions(+)
create mode 100644 rarpd.init
diff --git a/rarpd.init b/rarpd.init
new file mode 100644
index 0000000..efcf825
--- /dev/null
+++ b/rarpd.init
@@ -0,0 +1,96 @@
+#!/bin/bash
+#
+# /etc/init.d/rarpd
+#
+# Starts the rarpd daemon
+#
+# chkconfig: - 82 16
+# description: Server Reverse Address Resolution Protocol requests.
+# processname: rarpd
+
+### BEGIN INIT INFO
+# Provides: rarpd
+# Required-Start: $syslog $network
+# Required-Stop: $syslog $network
+# Default-Start:
+# Default-Stop: 0 1 2 3 4 5 6
+# Short-Description: start and stop rarpd
+# Description: RARP (Reverse Address Resolution Protocol) is a protocol \
+# which allows individual devices on an IP network to get \
+# their own IP addresses from the RARP server. \
+### END INIT INFO
+
+# Source function library.
+. /etc/init.d/functions
+
+# Read the config file if exists
+if [ -f /etc/sysconfig/rarpd ]; then
+ . /etc/sysconfig/rarpd
+fi
+
+RETVAL=0
+prog="rarpd"
+
+
+start() {
+ #if these files don't exist rarpd can't work
+ test -x /usr/sbin/rarpd -a -f /etc/ethers || exit 6
+ # Check if rarpd is already running
+ #if [ ! -f /var/lock/subsys/rarpd ]; then
+ status rarpd;
+ if [ $? -ne 0 ]; then
+ echo -n $"Starting $prog: "
+ daemon /usr/sbin/rarpd $OPTIONS $INTERFACE
+ RETVAL=$?
+ [ $RETVAL -eq 0 ] && touch /var/lock/subsys/rarpd
+ echo
+ fi
+ return $RETVAL
+}
+
+stop() {
+ echo -n $"Stopping $prog: "
+ killproc /usr/sbin/rarpd
+ RETVAL=$?
+ [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/rarpd
+ echo
+ return $RETVAL
+}
+reload() {
+ RETVAL=3
+}
+
+#
+# See how we were called.
+#
+case "$1" in
+ start)
+ start
+ ;;
+ stop)
+ stop
+ ;;
+ reload)
+ reload
+ ;;
+ force-reload|restart)
+ stop
+ start
+ ;;
+ condrestart)
+ if [ -f /var/lock/subsys/rarpd ]; then
+ stop
+ start
+ fi
+ ;;
+ status)
+ status rarpd
+ RETVAL=$?
+ ;;
+ *)
+ echo $"Usage: $0 {start|stop|restart|condrestart|reload|status|force-reload}"
+ RETVAL=2
+
+esac
+
+exit $RETVAL
--
1.8.4.2
|