--- /dev/null
+--- 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=$?
+ ;;
+ *)
-# 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
%prep
%setup -q
+%patch0 -p1
+
%{__python} setup.py configure \
--pidfile /var/run/wicd.pid