summaryrefslogtreecommitdiff
path: root/sys-apps/netplug/files/netplug-2
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /sys-apps/netplug/files/netplug-2
reinit the tree, so we can have metadata
Diffstat (limited to 'sys-apps/netplug/files/netplug-2')
-rw-r--r--sys-apps/netplug/files/netplug-243
1 files changed, 43 insertions, 0 deletions
diff --git a/sys-apps/netplug/files/netplug-2 b/sys-apps/netplug/files/netplug-2
new file mode 100644
index 000000000000..539f1465516a
--- /dev/null
+++ b/sys-apps/netplug/files/netplug-2
@@ -0,0 +1,43 @@
+#!/bin/sh
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+#
+# Gentoo-specific netplug script
+#
+# This file gets called by netplug when it wants to bring an interface
+# up or down.
+#
+
+IFACE="$1"
+ACTION="$2"
+
+EXEC="/etc/init.d/net.${IFACE}"
+
+case "${ACTION}" in
+ in)
+ ARGS="--quiet start"
+ ;;
+ out)
+ ARGS="--quiet stop"
+ ;;
+ probe)
+ # Do nothing as we should already be up
+ exit 0
+ ;;
+ *)
+ echo "$0: wrong arguments" >&2
+ echo "Call with <interface> <in|out|probe>" >&2
+ exit 1
+ ;;
+esac
+
+export IN_BACKGROUND=true
+
+if [ -x "${EXEC}" ]
+then
+ ${EXEC} ${ARGS}
+ exit 0
+else
+ logger -t netplug "Error: Couldn't configure ${IFACE}, no ${EXEC} !"
+ exit 1
+fi