Files
NetworkManager/initscript/Gentoo/NetworkManager
Dan Williams 293f0f0599 2004-12-03 Dan Williams <dcbw@redhat.com>
* initscript/Makefile.am
	* initscript/Debian/NetworkManager
	* initscript/Gentoo/NetworkManager
	* initscript/RedHat/NetworkManager
	* initscript/NMLaunchHelper.c
		- Remove NMLaunchHelper, if you need to wait until the network
			comes up, use the dead code from CVS.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@332 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2004-12-03 21:32:03 +00:00

50 lines
984 B
Plaintext
Executable File

#!/sbin/runscript
#
# NetworkManager: NetworkManager daemon
#
# chkconfig: 345 98 02
# description: This is a daemon for automatically switching network \
# connections to the best available connection. \
#
# processname: NetworkManager
# pidfile: /var/run/NetworkManager.pid
#
### BEGIN INIT INFO
# Provides: $network
### END INIT INFO
# Sanity checks.
[ -x /usr/bin/NetworkManager ] || exit 0
# We need /sbin/ip
[ -x /sbin/ip ] || exit 0
# so we can rearrange this easily
processname=/usr/bin/NetworkManager
pidfile=/var/run/NetworkManager.pid
depend() {
need hald
}
start()
{
if [ -e ${pidfile} ]; then
rm -f ${pidfile}
fi
ebegin "Starting NetworkManager"
start-stop-daemon --start --quiet --exec ${processname}
eend $?
echo $(/bin/pidof NetworkManager) > ${pidfile}
}
stop()
{
ebegin "Stopping NetworkManager"
start-stop-daemon --stop --quiet --exec ${processname} --pidfile ${pidfile}
eend $?
if [ -e ${pidfile} ]; then
rm -f $pidfile
fi
}