summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWout Mertens <wmertens@gentoo.org>2003-03-17 15:24:17 +0000
committerWout Mertens <wmertens@gentoo.org>2003-03-17 15:24:17 +0000
commit6d34946788147ea3ba6ba22273869e6d6c52a196 (patch)
tree8c7f135c05d47ca0ee2513daf776d89b7a64bca8 /sys-apps/ifplugd/files
parentAdded ~sparc to keywords. (diff)
downloadgentoo-2-6d34946788147ea3ba6ba22273869e6d6c52a196.tar.gz
gentoo-2-6d34946788147ea3ba6ba22273869e6d6c52a196.tar.bz2
gentoo-2-6d34946788147ea3ba6ba22273869e6d6c52a196.zip
New ebuild for ifplugd, an ethernet link monitor
Diffstat (limited to 'sys-apps/ifplugd/files')
-rw-r--r--sys-apps/ifplugd/files/digest-ifplugd-0.131
-rw-r--r--sys-apps/ifplugd/files/ifplugd36
-rw-r--r--sys-apps/ifplugd/files/ifplugd.action29
3 files changed, 66 insertions, 0 deletions
diff --git a/sys-apps/ifplugd/files/digest-ifplugd-0.13 b/sys-apps/ifplugd/files/digest-ifplugd-0.13
new file mode 100644
index 000000000000..8f15d23f8242
--- /dev/null
+++ b/sys-apps/ifplugd/files/digest-ifplugd-0.13
@@ -0,0 +1 @@
+MD5 20ebcc14501935c13f14f0b078ef2002 ifplugd-0.13.tar.gz 33289
diff --git a/sys-apps/ifplugd/files/ifplugd b/sys-apps/ifplugd/files/ifplugd
new file mode 100644
index 000000000000..66f0249fa8f7
--- /dev/null
+++ b/sys-apps/ifplugd/files/ifplugd
@@ -0,0 +1,36 @@
+#!/sbin/runscript
+# Copyright 1999-2003 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/ifplugd/files/ifplugd,v 1.1 2003/03/17 15:24:17 wmertens Exp $
+
+#NB: Config is in /etc/conf.d/ifplugd
+
+IFPLUGD=/usr/sbin/ifplugd
+
+[ -z "$INTERFACES" ] && INTERFACES="eth0"
+[ "$INTERFACES" = "auto" ] && INTERFACES=`cat /proc/net/dev | awk '{ print $1 }' | grep ^eth | cut -d: -f1`
+
+start() {
+ einfon "Starting ifplugd: "
+ for IF in $INTERFACES ; do
+ echo -n "$IF "
+ $IFPLUGD -i $IF $ARGS
+ if [ $? -ne 0 ]; then
+ eend $? "Problem starting for $IF"
+ return 1
+ fi
+ done
+ eend 0
+}
+
+stop() {
+ einfon "Stopping ifplugd: "
+ for IF in $INTERFACES ; do
+ echo -n "$IF "
+ $IFPLUGD -k -i $IF || ewarn "Couldn't stop instance for $IF"
+ done
+ eend 0
+}
+
+
+# vim:ts=4
diff --git a/sys-apps/ifplugd/files/ifplugd.action b/sys-apps/ifplugd/files/ifplugd.action
new file mode 100644
index 000000000000..80d961e0648a
--- /dev/null
+++ b/sys-apps/ifplugd/files/ifplugd.action
@@ -0,0 +1,29 @@
+#!/bin/sh
+#
+# This file is part of ifplugd, and adapted for use in Gentoo Linux.
+#
+# ifplugd is free software; you can redistribute it and/or modify it under
+# the terms of the GNU General Public License as published by the Free
+# Software Foundation; either version 2 of the License, or (at your
+# option) any later version.
+#
+# ifplugd is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with ifplugd; if not, write to the Free Software Foundation,
+# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+
+set -e
+
+if [ -z "$1" ] || [ -z "$2" ] ; then
+ echo "Wrong arguments" > /dev/stderr
+ exit 1
+fi
+
+[ "$2" = "up" ] && /etc/init.d/net.$1 start > /dev/null
+[ "$2" = "down" ] && /etc/init.d/net.$1 stop > /dev/null
+
+exit 0