1
0
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:
Andrew Psaltis
2009-12-01 23:24:48 -05:00
parent 9b53508a82
commit 3ca3da00a0
4 changed files with 34 additions and 17 deletions

View File

@@ -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
View File

@@ -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

View File

@@ -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

View File

@@ -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'