1 |
slords |
1.1 |
--- ./ulogd.init.fedora 2004-03-23 23:36:12.000000000 +0100 |
2 |
|
|
+++ ./ulogd.init 2005-11-13 18:52:09.000000000 +0100 |
3 |
|
|
@@ -1,16 +1,23 @@ |
4 |
|
|
#!/bin/sh |
5 |
|
|
# |
6 |
|
|
-# chkconfig: 345 81 19 |
7 |
|
|
+# chkconfig: - 81 19 |
8 |
|
|
# description: ulogd is the userspace logging daemon for netfilter/iptables |
9 |
|
|
# |
10 |
|
|
|
11 |
|
|
|
12 |
|
|
. /etc/rc.d/init.d/functions |
13 |
|
|
|
14 |
|
|
+prog="ulogd" |
15 |
|
|
+ |
16 |
|
|
+# Source networking configuration. |
17 |
|
|
+. /etc/sysconfig/network |
18 |
|
|
+ |
19 |
|
|
+# Check that networking is up. |
20 |
|
|
+[ "$NETWORKING" = "no" ] && exit 0 |
21 |
|
|
|
22 |
|
|
function start() |
23 |
|
|
{ |
24 |
|
|
- printf "Starting %s: " "ulogd" |
25 |
|
|
+ echo -n $"Starting $prog: " |
26 |
|
|
daemon /usr/sbin/ulogd -d |
27 |
|
|
echo |
28 |
|
|
touch /var/lock/subsys/ulogd |
29 |
|
|
@@ -19,7 +26,7 @@ |
30 |
|
|
|
31 |
|
|
function stop() |
32 |
|
|
{ |
33 |
|
|
- printf "Stopping %s: " "ulogd" |
34 |
|
|
+ echo -n $"Stopping $prog: " |
35 |
|
|
killproc ulogd |
36 |
|
|
echo |
37 |
|
|
rm -f /var/lock/subsys/ulogd |
38 |
|
|
@@ -28,6 +35,7 @@ |
39 |
|
|
|
40 |
|
|
function reload() |
41 |
|
|
{ |
42 |
|
|
+ echo -n $"Reloading $prog: " |
43 |
|
|
pid=`pidof ulogd` |
44 |
|
|
if [ "x$pid" != "x" ]; then |
45 |
|
|
kill -HUP $pid 2>/dev/null |
46 |
|
|
@@ -54,8 +62,8 @@ |
47 |
|
|
status ulogd |
48 |
|
|
;; |
49 |
|
|
*) |
50 |
|
|
- printf "Usage: %s {start|stop|status|restart|reload}\n" "ulogd" |
51 |
|
|
- exit 1 |
52 |
|
|
+ echo $"Usage: $0 {start|stop|status|restart|reload}" |
53 |
|
|
+ exit 2 |
54 |
|
|
esac |
55 |
|
|
|
56 |
|
|
exit 0 |