Files
NetworkManager/initscript/Slackware/rc.networkmanager
Dan Williams 58d310199c 2005-12-06 Dan Williams <dcbw@redhat.com>
Slackware patches from Paul Blazejowski <paulb@blazebox.homeip.net>
	* initscript/Slackware/rc.networkmanager
		- Cosmetic fix

	* src/backends/NetworkManagerSlackware.c
		- Kill dhcpcd when starting so that dhclient can bind to DHCP on
			interfaces


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1127 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-12-06 21:24:23 +00:00

67 lines
1.1 KiB
Bash
Executable File

#!/bin/sh
#
# NetworkManager: NetworkManager daemon
#
# description: This is a daemon for automatically switching network \
# connections to the best available connection. \
#
# processname: NetworkManager
# pidfile: /var/run/NetworkManager.pid
#
# We need /sbin/ip
[ -x /sbin/ip ] || exit 1
processname=NetworkManager
servicename=NetworkManager
pidfile=/var/run/NetworkManager.pid
RETVAL=0
start()
{
if [ "`pgrep dbus-daemon`" = "" ]; then
echo -n "D-BUS must be running to start NetworkManager"
exit 1
fi
if [ "`pgrep hald`" = "" ]; then
echo -n "HAL must be running to start NetworkManager"
exit 1
fi
echo -n $"Starting NetworkManager daemon: "
$servicename
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && echo `/sbin/pidof $processname` > $pidfile
}
stop()
{
echo -n $"Stopping NetworkManager daemon: "
killall -s TERM $servicename
RETVAL=$?
echo
if [ $RETVAL -eq 0 ]; then
rm -f $pidfile
fi
}
# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
stop
start
;;
*)
echo $"Usage: $0 {start|stop|restart}"
;;
esac
exit $RETVAL