1
0
mirror of https://github.com/gryf/wicd.git synced 2025-12-21 05:18:02 +01:00

Added distro-specific init scripts based on those used by NM (these are very experimental and likely broken in many cases).

Updated setup.py to pick which initscript to install based on the distro detected.
Updated MANIFEST.in to make sure launchdaemon.sh is included in the sdist build.
Fixed a bunch of crash bugs in tool detection system when tools are detected.
Made tool detection work correctly when "which" returns output if no match is found (as opposed to no output).  Eventually we might want to hardcode possible paths instead of using which at all...
Fixed some message formatting in the daemon.
Added some docstrings.
Added a pidfile system for increased initscript compatibility (sort of, it's somewhat incomplete).
This commit is contained in:
imdano
2008-03-24 00:03:35 +00:00
parent c055ea0d36
commit ef9b5cc7f3
18 changed files with 567 additions and 188 deletions

View File

@@ -0,0 +1,49 @@
#! /bin/sh
### BEGIN INIT INFO
# Provides: wicd-daemon
# Required-Start: dbus
# Default-Start: 3 4 5
# Default-Stop:
# Description: wicd, a wired and wireless connection manager.
### END INIT INFO
WICD_BIN=/opt/wicd/daemon.py
test -x $WICD_BIN || exit 5
. /etc/rc.status
rc_reset
case "$1" in
start)
checkproc $WICD_BIN
if [ $? = 0 ]; then
echo -n "wicd already running"
rc_status -v
rc_exit
fi
echo -n "Starting wicd"
startproc $WICD_BIN
rc_status -v
;;
stop)
echo -n "Shutting down wicd"
killproc -TERM $WICD_BIN
rc_status -v
;;
restart)
$0 stop
$0 start
rc_status
;;
status)
echo -n "Checking for wicd: "
checkproc $WICD_BIN
rc_status -v
;;
*)
echo "Usage: $0 {start|stop|status|restart}"
exit 1
;;
esac