1
0
mirror of https://github.com/gryf/wicd.git synced 2025-12-25 07:32:29 +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,44 @@
#!/sbin/runscript
#
# wicd: wicd daemon
#
# chkconfig: 345 98 02
# description: This is a daemon for managing network connections.
#
# processname: wicd
# pidfile: /var/run/wicd.pid
#
### BEGIN INIT INFO
# Provides: $network
### END INIT INFO
WICD_BIN=/opt/wicd/daemon.py
NAME=wicd-daemon
# Sanity checks.
[ -x $WICD_BIN ] || exit 0
# so we can rearrange this easily
processname=$WICD_BIN
pidfile=/var/run/wicd.pid
processargs="-P ${pidfile}"
start()
{
if [ -e ${pidfile} ]; then
rm -f ${pidfile}
fi
ebegin "Starting wicd"
start-stop-daemon --start --quiet --exec ${processname} -- ${processargs}
eend $?
}
stop()
{
ebegin "Stopping wicd"
start-stop-daemon --stop --quiet --name ${NAME} --pidfile ${pidfile}
eend $?
if [ -e ${pidfile} ]; then
rm -f $pidfile
fi
}