diff --git a/AUTHORS b/AUTHORS index 0c03fec..dd07927 100644 --- a/AUTHORS +++ b/AUTHORS @@ -1,3 +1,3 @@ Adam Blackburn (compwiz18@gmail.com) Dan O'Reilly (oreilldf@gmail.com) -Andrew Psaltis (ampsaltis@gmail.com) (wicd-curses) +Andrew Psaltis (ampsaltis@gmail.com) diff --git a/NEWS b/NEWS index 96913d5..9ccf95d 100644 --- a/NEWS +++ b/NEWS @@ -2,7 +2,7 @@ Wicd 1.6.0 Branch 1.7.0a2: Major Changes: - Connection information is available by right clicking the tray icon - - Can set the hostname per network for all DHCP clients except dhclient + - Can set the hostname per network for all DHCP clients - urwid 0.9.9 is now supported - Added wicd-cli, a command line interface for use in scripts - Global scripts are now passed parameters specifying the network diff --git a/in/init=redhat=wicd.in b/in/init=redhat=wicd.in index 0591aae..4153a38 100755 --- a/in/init=redhat=wicd.in +++ b/in/init=redhat=wicd.in @@ -8,36 +8,52 @@ # Source function library. . /etc/rc.d/init.d/functions -# This script was borrowed from the Wicd wiki page on building for Fedora -# http://wicd.net/wiki/doku.php?id=fedora WICD_BIN=%SBIN%wicd +pidfile=%PIDFILE% +servicename=wicd +processname=wicd +start() +{ + echo -n "Starting wicd service: " + daemon $WICD_BIN 2> /dev/null + RETVAL=$? + echo + [ "$RETVAL" = "0" ] && touch /var/lock/subsys/$servicename +} +stop() +{ + echo -n "Stopping wicd service: " + killproc -p $pidfile wicd + RETVAL=$? + echo + if [ $RETVAL -eq 0 ]; then + rm -f /var/lock/subsys/$servicename + rm -f $pidfile + fi +} + + case "$1" in start) - echo -n "Starting wicd services: " - daemon $WICD_BIN 2> /dev/null - touch /var/lock/subsys/wicd + start ;; stop) - echo -n "Shutting down wicd services: " - killall wicd 2> /dev/null - rm -f /var/lock/subsys/wicd + stop ;; status) - if pidofproc wicd > /dev/null ; then - echo "wicd is running." - else - status wicd - fi + status -p $pidfile $processname + RETVAL=$? ;; restart | reload) - $0 stop - $0 start + stop + start ;; *) echo "Usage: wicd {start|stop|status|reload|restart}" exit 1 ;; esac +exit $RETVAL diff --git a/setup.py b/setup.py index ebe6184..1c8fc63 100644 --- a/setup.py +++ b/setup.py @@ -238,6 +238,7 @@ class configure(Command): elif self.distro in ['redhat','centos','fedora']: self.init = '/etc/rc.d/init.d/' self.initfile = 'init/redhat/wicd' + self.pidfile = '/var/run/wicd.pid' elif self.distro in ['slackware','slamd64','bluewhite64']: self.init = '/etc/rc.d/' self.initfile = 'init/slackware/rc.wicd'