summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net-misc')
-rw-r--r--net-misc/networkmanager/ChangeLog6
-rw-r--r--net-misc/networkmanager/files/NetworkManagerDispatcher48
-rw-r--r--net-misc/networkmanager/networkmanager-0.6.5_p20080130.ebuild3
3 files changed, 55 insertions, 2 deletions
diff --git a/net-misc/networkmanager/ChangeLog b/net-misc/networkmanager/ChangeLog
index 1414dcc2abab..0c9e08ba97b9 100644
--- a/net-misc/networkmanager/ChangeLog
+++ b/net-misc/networkmanager/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for net-misc/networkmanager
# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/networkmanager/ChangeLog,v 1.24 2008/02/02 07:09:34 steev Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/networkmanager/ChangeLog,v 1.25 2008/02/02 07:37:39 steev Exp $
+
+ 02 Feb 2008; Steev Klimaszewski <steev@gentoo.org>
+ +files/NetworkManagerDispatcher, networkmanager-0.6.5_p20080130.ebuild:
+ Add NetworkManagerDispatcher init script for the latest snapshot
*networkmanager-0.6.5_p20080130 (02 Feb 2008)
diff --git a/net-misc/networkmanager/files/NetworkManagerDispatcher b/net-misc/networkmanager/files/NetworkManagerDispatcher
new file mode 100644
index 000000000000..24aa37b97f69
--- /dev/null
+++ b/net-misc/networkmanager/files/NetworkManagerDispatcher
@@ -0,0 +1,48 @@
+#!/sbin/runscript
+#
+# NetworkManagerDispatcher: NetworkManagerDispatcher daemon
+#
+# chkconfig: 345 98 02
+# description: This is a daemon for automatically executing certain
+# actions, when switching networks
+#
+# processname: NetworkManagerDispatcher
+# pidfile: /var/run/NetworkManagerDispatcher.pid
+
+prefix=/usr
+exec_prefix=/usr
+sbindir=${exec_prefix}/sbin
+
+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() {
+ need NetworkManager
+}
+
+start()
+{
+ if [ -e ${pidfile} ]; then
+ rm -f ${pidfile}
+ fi
+ ebegin "Starting NetworkManagerDispatcher"
+ start-stop-daemon --start --quiet --exec ${processname}
+ eend $?
+ echo $(/bin/pidof NetworkManagerDispatcher) > ${pidfile}
+}
+
+stop()
+{
+ ebegin "Stopping NetworkManagerDispatcher"
+ start-stop-daemon --stop --quiet --exec ${processname} --pidfile ${pidfile}
+ eend $?
+ if [ -e ${pidfile} ]; then
+ rm -f $pidfile
+ fi
+}
diff --git a/net-misc/networkmanager/networkmanager-0.6.5_p20080130.ebuild b/net-misc/networkmanager/networkmanager-0.6.5_p20080130.ebuild
index 7faef2748141..80e4d8f5bfd0 100644
--- a/net-misc/networkmanager/networkmanager-0.6.5_p20080130.ebuild
+++ b/net-misc/networkmanager/networkmanager-0.6.5_p20080130.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/networkmanager/networkmanager-0.6.5_p20080130.ebuild,v 1.1 2008/02/02 07:09:34 steev Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/networkmanager/networkmanager-0.6.5_p20080130.ebuild,v 1.2 2008/02/02 07:37:39 steev Exp $
inherit gnome2 eutils
@@ -79,6 +79,7 @@ src_install() {
gnome2_src_install
# Need to keep the /var/run/NetworkManager directory
keepdir /var/run/NetworkManager
+ newinitd "${FILESDIR}/NetworkManagerDispatcher" NetworkManagerDispatcher
}
pkg_postinst() {