mirror of
https://github.com/gryf/wicd.git
synced 2025-12-20 04:48: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)
|
Adam Blackburn (compwiz18@gmail.com)
|
||||||
Dan O'Reilly (oreilldf@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:
|
1.7.0a2:
|
||||||
Major Changes:
|
Major Changes:
|
||||||
- Connection information is available by right clicking the tray icon
|
- 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
|
- urwid 0.9.9 is now supported
|
||||||
- Added wicd-cli, a command line interface for use in scripts
|
- Added wicd-cli, a command line interface for use in scripts
|
||||||
- Global scripts are now passed parameters specifying the network
|
- Global scripts are now passed parameters specifying the network
|
||||||
|
|||||||
@@ -8,36 +8,52 @@
|
|||||||
# Source function library.
|
# Source function library.
|
||||||
. /etc/rc.d/init.d/functions
|
. /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
|
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
|
case "$1" in
|
||||||
start)
|
start)
|
||||||
echo -n "Starting wicd services: "
|
start
|
||||||
daemon $WICD_BIN 2> /dev/null
|
|
||||||
touch /var/lock/subsys/wicd
|
|
||||||
;;
|
;;
|
||||||
stop)
|
stop)
|
||||||
echo -n "Shutting down wicd services: "
|
stop
|
||||||
killall wicd 2> /dev/null
|
|
||||||
rm -f /var/lock/subsys/wicd
|
|
||||||
;;
|
;;
|
||||||
status)
|
status)
|
||||||
if pidofproc wicd > /dev/null ; then
|
status -p $pidfile $processname
|
||||||
echo "wicd is running."
|
RETVAL=$?
|
||||||
else
|
|
||||||
status wicd
|
|
||||||
fi
|
|
||||||
;;
|
;;
|
||||||
restart | reload)
|
restart | reload)
|
||||||
$0 stop
|
stop
|
||||||
$0 start
|
start
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo "Usage: wicd {start|stop|status|reload|restart}"
|
echo "Usage: wicd {start|stop|status|reload|restart}"
|
||||||
exit 1
|
exit 1
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
exit $RETVAL
|
||||||
|
|
||||||
|
|||||||
1
setup.py
1
setup.py
@@ -238,6 +238,7 @@ class configure(Command):
|
|||||||
elif self.distro in ['redhat','centos','fedora']:
|
elif self.distro in ['redhat','centos','fedora']:
|
||||||
self.init = '/etc/rc.d/init.d/'
|
self.init = '/etc/rc.d/init.d/'
|
||||||
self.initfile = 'init/redhat/wicd'
|
self.initfile = 'init/redhat/wicd'
|
||||||
|
self.pidfile = '/var/run/wicd.pid'
|
||||||
elif self.distro in ['slackware','slamd64','bluewhite64']:
|
elif self.distro in ['slackware','slamd64','bluewhite64']:
|
||||||
self.init = '/etc/rc.d/'
|
self.init = '/etc/rc.d/'
|
||||||
self.initfile = 'init/slackware/rc.wicd'
|
self.initfile = 'init/slackware/rc.wicd'
|
||||||
|
|||||||
Reference in New Issue
Block a user