]> git.pld-linux.org Git - packages/wicd.git/commitdiff
- fix daemon status and stop - send this patch upstream
authorBartłomiej Zimoń <cactus@pld-linux.org>
Thu, 20 Aug 2009 21:03:51 +0000 (21:03 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    wicd-init_status.patch -> 1.1
    wicd.spec -> 1.25

wicd-init_status.patch [new file with mode: 0644]
wicd.spec

diff --git a/wicd-init_status.patch b/wicd-init_status.patch
new file mode 100644 (file)
index 0000000..b6d3431
--- /dev/null
@@ -0,0 +1,54 @@
+--- wicd-1.5.9/in/init=pld=wicd.in.orig        2009-02-06 16:28:22.000000000 +0100
++++ wicd-1.5.9/in/init=pld=wicd.in     2009-08-20 22:48:55.000000000 +0200
+@@ -20,26 +20,28 @@
+ # [ -f /etc/sysconfig/wicd ] && . /etc/sysconfig/wicd
+ WICD_BIN=%SBIN%wicd
++WICD_PIDFILE=%PIDFILE%
++WICD_LOCKFILE=/var/lock/subsys/wicd
+ start() {
+       # Check if the service is already running?
+-      if [ ! -f /var/lock/subsys/wicd ]; then
++      if [ ! -f $WICD_LOCKFILE ]; then
+               msg_starting wicd
+               daemon $WICD_BIN
+               RETVAL=$?
+-              [ $RETVAL -eq 0 ] && touch /var/lock/subsys/wicd
++              [ $RETVAL -eq 0 ] && touch $WICD_LOCKFILE
+       else
+               msg_already_running wicd
+       fi
+ }
+ stop() {
+-      if [ -f /var/lock/subsys/wicd ]; then
++      if [ -f $WICD_LOCKFILE ]; then
+               # Stop daemons.
+               msg_stopping wicd
+               # killproc wicd
+-              killproc --pidfile /var/run/wicd.pid wicd -TERM
+-              rm -f /var/lock/subsys/wicd
++              killproc --pidfile $WICD_PIDFILE wicd -TERM
++              rm -f $WICD_LOCKFILE
+       else
+               msg_not_running wicd
+       fi
+@@ -47,7 +49,7 @@
+ condrestart() {
+-      if [ -f /var/lock/subsys/wicd ]; then
++      if [ -f $WICD_LOCKFILE ]; then
+               stop
+               start
+       else
+@@ -77,7 +79,7 @@
+       condrestart 7
+       ;;
+   status)
+-      status wicd
++      status --pidfile $WICD_PIDFILE wicd
+       RETVAL=$?
+       ;;
+   *)
index 1904fb18112ddbd71e5f3ea6d661bc7a991cd57e..ff7cf316481d4a58ad84e2cce0a2c20a85157baa 100644 (file)
--- a/wicd.spec
+++ b/wicd.spec
@@ -1,14 +1,14 @@
-# TODO: Fix daemon status and stop (wicd dead but subsys locked but daemon running)
 # TODO: Fix files list
 Summary:       wired and wireless network manager
 Summary(pl.UTF-8):     Zarządca sieci przewodowych i bezprzewodowych
 Name:          wicd
 Version:       1.5.9
-Release:       1
+Release:       2
 License:       GPL v2
 Group:         X11/Applications
 Source0:       http://dl.sourceforge.net/wicd/%{name}-%{version}.tar.gz
 # Source0-md5: 4743a30eb8e3898b8b1a319b0c373ce5
+Patch0:                %{name}-init_status.patch
 URL:           http://wicd.net/
 # /etc/pld-release used to detect platform
 BuildRequires: issue
@@ -36,6 +36,8 @@ różnorakimi opcjami.
 
 %prep
 %setup -q
+%patch0 -p1
+
 %{__python} setup.py configure \
        --pidfile /var/run/wicd.pid
 
This page took 0.086877 seconds and 4 git commands to generate.