mirror of
https://github.com/gryf/wicd.git
synced 2025-12-19 20:38:00 +01:00
Improved compatibility with the init system in Fedora/RHEL/CentOS.
This commit is contained in:
2
AUTHORS
2
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)
|
||||
|
||||
2
NEWS
2
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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
1
setup.py
1
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'
|
||||
|
||||
Reference in New Issue
Block a user