mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-08 10:08:05 +02:00
new initscripts for Gentoo
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3346 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
parent
8ffe21b65f
commit
616663c69d
3 changed files with 47 additions and 91 deletions
|
|
@ -1,3 +1,11 @@
|
||||||
|
2008-02-27 Saleem Abdulrasool <compnerd@compnerd.org>
|
||||||
|
|
||||||
|
reviewed by: steev@steev.net
|
||||||
|
|
||||||
|
* initscript/Gentoo/NetworkManager.in:
|
||||||
|
* initscript/Gentoo/NetworkManagerDispatcher.in:
|
||||||
|
Update the scripts and move them to Gentoo style.
|
||||||
|
|
||||||
2008-02-27 Dan Williams <dcbw@redhat.com>
|
2008-02-27 Dan Williams <dcbw@redhat.com>
|
||||||
|
|
||||||
Patch from Will Stephenson <wstephenson@kde.org>
|
Patch from Will Stephenson <wstephenson@kde.org>
|
||||||
|
|
|
||||||
|
|
@ -1,55 +1,28 @@
|
||||||
#!/sbin/runscript
|
#!/sbin/runscript
|
||||||
#
|
# Copyright (c) 2008 Saleem Abdulrasool <compnerd@compnerd.org>
|
||||||
# NetworkManager: NetworkManager daemon
|
# Distributed under the terms of the GNU General Purpose License v2
|
||||||
#
|
# $Header: $
|
||||||
# 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@
|
|
||||||
sbindir=@sbindir@
|
|
||||||
|
|
||||||
NETWORKMANAGER_BIN=${sbindir}/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() {
|
depend() {
|
||||||
need hald dhcdbd
|
need hald
|
||||||
}
|
}
|
||||||
|
|
||||||
start()
|
start() {
|
||||||
{
|
ebegin "Starting NetworkManager"
|
||||||
if [ -e ${pidfile} ]; then
|
start-stop-daemon --start --quiet --pidfile /var/run/NetworkManager.pid --exec /usr/sbin/NetworkManager
|
||||||
rm -f ${pidfile}
|
eend $?
|
||||||
fi
|
|
||||||
ebegin "Starting NetworkManager"
|
|
||||||
start-stop-daemon --start --quiet --exec ${processname}
|
|
||||||
eend $?
|
|
||||||
echo $(/bin/pidof NetworkManager) > ${pidfile}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
stop()
|
stop() {
|
||||||
{
|
local retval
|
||||||
ebegin "Stopping NetworkManager"
|
|
||||||
start-stop-daemon --stop --quiet --exec ${processname} --pidfile ${pidfile}
|
ebegin "Stopping NetworkManager"
|
||||||
eend $?
|
start-stop-daemon --stop --quiet --pidfile /var/run/NetworkManager.pid
|
||||||
if [ -e ${pidfile} ]; then
|
retval=$?
|
||||||
rm -f $pidfile
|
eend ${retval}
|
||||||
fi
|
|
||||||
|
[ -e /var/run/NetworkManager.pid ] && rm -f /var/run/NetworkManager.pid
|
||||||
|
return ${retval}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# vim: set ft=gentoo-init-d ts=3 sw=3 et:
|
||||||
|
|
|
||||||
|
|
@ -1,52 +1,27 @@
|
||||||
#!/sbin/runscript
|
#!/sbin/runscript
|
||||||
#
|
# Copyright (c) 2008 Saleem Abdulrasool <compnerd@compnerd.org>
|
||||||
# NetworkManagerDispatcher: NetworkManagerDispatcher daemon
|
# Distributed under the terms of the GNU General Purpose License v2
|
||||||
#
|
# $Header: $
|
||||||
# chkconfig: 345 98 02
|
|
||||||
# description: This is a daemon for automatically executing scripts \
|
|
||||||
# when network connections change. \
|
|
||||||
#
|
|
||||||
# processname: NetworkManagerDispatcher
|
|
||||||
# pidfile: /var/run/NetworkManagerDispatcher.pid
|
|
||||||
#
|
|
||||||
### BEGIN INIT INFO
|
|
||||||
# Provides: networkmanager-dispatcher
|
|
||||||
### END INIT INFO
|
|
||||||
|
|
||||||
prefix=@prefix@
|
|
||||||
exec_prefix=@prefix@
|
|
||||||
sbindir=@sbindir@
|
|
||||||
|
|
||||||
NETWORKMANAGERDISPATCHER_BIN=${sbindir}/NetworkManagerDispatcher
|
|
||||||
|
|
||||||
# Sanity checks.
|
|
||||||
[ -x $NETWORKMANAGERDISPATCHER_BIN ] || exit 0
|
|
||||||
|
|
||||||
# so we can rearrange this easily
|
|
||||||
processname=$NETWORKMANAGERDISPATCHER_BIN
|
|
||||||
pidfile=/var/run/NetworkManagerDispatcher.pid
|
|
||||||
|
|
||||||
depend() {
|
depend() {
|
||||||
need NetworkManager
|
need NetworkManager
|
||||||
}
|
}
|
||||||
|
|
||||||
start()
|
start() {
|
||||||
{
|
ebegin "Starting NetworkManagerDispatcher"
|
||||||
if [ -e ${pidfile} ]; then
|
start-stop-daemon --start --quiet --pidfile /var/run/NetworkManagerDispatcher.pid --exec /usr/sbin/NetworkManagerDispatcher
|
||||||
rm -f ${pidfile}
|
eend $?
|
||||||
fi
|
|
||||||
ebegin "Starting NetworkManagerDispatcher"
|
|
||||||
start-stop-daemon --start --quiet --exec ${processname}
|
|
||||||
eend $?
|
|
||||||
echo $(/bin/pidof NetworkManagerDispatcher) > ${pidfile}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
stop()
|
stop() {
|
||||||
{
|
local retval
|
||||||
ebegin "Stopping NetworkManagerDispatcher"
|
|
||||||
start-stop-daemon --stop --quiet --exec ${processname} --pidfile ${pidfile}
|
ebegin "Stopping NetworkManagerDispatcher"
|
||||||
eend $?
|
start-stop-daemon --stop --quiet --pidfile /var/run/NetworkManagerDispatcher.pid
|
||||||
if [ -e ${pidfile} ]; then
|
retval=$?
|
||||||
rm -f $pidfile
|
eend ${retval}
|
||||||
fi
|
|
||||||
|
[ -e /var/run/NetworkManagerDispatcher.pid ] && rm -f /var/run/NetworkManagerDispatcher.pid
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# vim: set ft=gentoo-init-d ts=3 sw=3 et:
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue