
* initscript/Gentoo/NetworkManager: * initscript/RedHat/NetworkManager: * initscript/RedHat/NetworkManagerDispatcher: * initscript/SUSE/networkmanager: CVS remove these in place of .in replacements * configure.in: * initscript/Gentoo/NetworkManager.in: * initscript/RedHat/NetworkManager.in: * initscript/RedHat/NetworkManagerDispatcher.in: * initscript/SUSE/networkmanager.in: These scripts now are generated so they work still when NM is built using a bindir other than /usr/bin git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@880 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
56 lines
1.0 KiB
Plaintext
Executable File
56 lines
1.0 KiB
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
|
|
|
|
prefix=@prefix@
|
|
exec_prefix=@prefix@
|
|
bindir=@bindir@
|
|
|
|
NETWORKMANAGER_BIN=${bindir}/NetworkManager
|
|
|
|
# Sanity checks.
|
|
[ -x $NETWORKMANAGER_BIN ] || exit 0
|
|
|
|
# We need /sbin/ip
|
|
[ -x /sbin/ip ] || exit 0
|
|
|
|
# so we can rearrange this easily
|
|
processname=$NETWORKMANAGER_BIN
|
|
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
|
|
}
|