/[smeserver]/rpms/ulogd/sme10/ulogd-1.02-init.patch
ViewVC logotype

Contents of /rpms/ulogd/sme10/ulogd-1.02-init.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.2 - (show annotations) (download)
Thu Mar 4 19:46:44 2021 UTC (3 years, 2 months ago) by jpp
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +0 -0 lines
FILE REMOVED
* Wed Mar 03 2021 Jean-Philipe Pialasse <tests@pialasse.com> 2.0.7-2.sme
- bump version to 2.0.7 [SME: 11248]
- remove init script, let integrator choose between systemd and init.

1 --- ./ulogd.init.lsbinit 2005-11-25 20:58:27.000000000 +0100
2 +++ ./ulogd.init 2007-07-14 10:25:22.000000000 +0200
3 @@ -1,36 +1,66 @@
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 +### BEGIN INIT INFO
10 +# Provides: ulogd
11 +# Required-Start: $local_fs $network $remote_fs
12 +# Should-Start: $syslog
13 +# Required-Stop: $local_fs $network $remote_fs
14 +# Should-Stop: $syslog
15 +# Default-Start:
16 +# Default-Stop: 0 1 6
17 +# Short-Description: start and stop ulogd
18 +# Description: ulogd is the userspace logging daemon for netfilter/iptables
19 +### END INIT INFO
20 #
21
22
23 . /etc/rc.d/init.d/functions
24
25 +prog="ulogd"
26 +test -x /usr/sbin/ulogd || exit 0
27 +
28 +# Source networking configuration.
29 +. /etc/sysconfig/network
30 +
31 +# Check that networking is up.
32 +[ "$NETWORKING" = "no" ] && exit 0
33
34 function start()
35 {
36 - printf "Starting %s: " "ulogd"
37 - daemon /usr/sbin/ulogd -d
38 - echo
39 - touch /var/lock/subsys/ulogd
40 + pid=`pidof ulogd`
41 + if [ "x$pid" == "x" ]; then
42 + echo -n $"Starting $prog: "
43 + daemon /usr/sbin/ulogd -d || exit $?
44 + echo
45 + touch /var/lock/subsys/ulogd
46 + else
47 + echo $"$prog is already running."
48 + fi
49 }
50
51
52 function stop()
53 {
54 - printf "Stopping %s: " "ulogd"
55 - killproc ulogd
56 - echo
57 - rm -f /var/lock/subsys/ulogd
58 + pid=`pidof ulogd`
59 + if [ "x$pid" != "x" ]; then
60 + echo -n $"Stopping $prog: "
61 + killproc ulogd || exit $?
62 + echo
63 + rm -f /var/lock/subsys/ulogd
64 + else
65 + echo $"$prog is already stopped."
66 + fi
67 }
68
69
70 function reload()
71 {
72 + echo -n $"Reloading $prog: "
73 pid=`pidof ulogd`
74 if [ "x$pid" != "x" ]; then
75 - kill -HUP $pid 2>/dev/null
76 + kill -HUP $pid 2>/dev/null || exit $?
77 fi
78 touch /var/lock/subsys/ulogd
79 }
80 @@ -44,18 +74,26 @@ case "$1" in
81 stop
82 ;;
83 restart)
84 + echo $"restarting $prog..."
85 stop
86 start
87 ;;
88 - reload)
89 + try-restart|condrestart)
90 + pid=`pidof ulogd`
91 + if [ "x$pid" != "x" ]; then
92 + stop
93 + start
94 + fi
95 + ;;
96 + reload|force-reload)
97 reload
98 ;;
99 status)
100 status ulogd
101 ;;
102 *)
103 - printf "Usage: %s {start|stop|status|restart|reload}\n" "ulogd"
104 - exit 1
105 + echo $"Usage: $0 {start|stop|status|restart|reload}"
106 + exit 2
107 esac
108
109 exit 0

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed