]> git.pld-linux.org Git - packages/wicd.git/blob - wicd-init_status.patch
- rel 9
[packages/wicd.git] / wicd-init_status.patch
1 --- wicd-1.5.9/in/init=pld=wicd.in.orig 2009-02-06 16:28:22.000000000 +0100
2 +++ wicd-1.5.9/in/init=pld=wicd.in      2009-08-20 22:48:55.000000000 +0200
3 @@ -20,26 +20,28 @@
4  # [ -f /etc/sysconfig/wicd ] && . /etc/sysconfig/wicd
5  
6  WICD_BIN=%SBIN%wicd
7 +WICD_PIDFILE=%PIDFILE%
8 +WICD_LOCKFILE=/var/lock/subsys/wicd
9  
10  start() {
11         # Check if the service is already running?
12 -       if [ ! -f /var/lock/subsys/wicd ]; then
13 +       if [ ! -f $WICD_LOCKFILE ]; then
14                 msg_starting wicd
15                 daemon $WICD_BIN
16                 RETVAL=$?
17 -               [ $RETVAL -eq 0 ] && touch /var/lock/subsys/wicd
18 +               [ $RETVAL -eq 0 ] && touch $WICD_LOCKFILE
19         else
20                 msg_already_running wicd
21         fi
22  }
23  
24  stop() {
25 -       if [ -f /var/lock/subsys/wicd ]; then
26 +       if [ -f $WICD_LOCKFILE ]; then
27                 # Stop daemons.
28                 msg_stopping wicd
29                 # killproc wicd
30 -               killproc --pidfile /var/run/wicd.pid wicd -TERM
31 -               rm -f /var/lock/subsys/wicd
32 +               killproc --pidfile $WICD_PIDFILE wicd -TERM
33 +               rm -f $WICD_LOCKFILE
34         else
35                 msg_not_running wicd
36         fi
37 @@ -47,7 +49,7 @@
38  
39  
40  condrestart() {
41 -       if [ -f /var/lock/subsys/wicd ]; then
42 +       if [ -f $WICD_LOCKFILE ]; then
43                 stop
44                 start
45         else
46 @@ -77,7 +79,7 @@
47         condrestart 7
48         ;;
49    status)
50 -       status wicd
51 +       status --pidfile $WICD_PIDFILE wicd
52         RETVAL=$?
53         ;;
54    *)
This page took 0.065341 seconds and 3 git commands to generate.