summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWout Mertens <wmertens@gentoo.org>2003-08-06 18:00:34 +0000
committerWout Mertens <wmertens@gentoo.org>2003-08-06 18:00:34 +0000
commit9c6d2f1afb9f31509d039d3abd1b756939659222 (patch)
treebe914ad20d48b37e82f5d6160716c8c90ef67028 /sys-apps/ifplugd
parentMarked stable (diff)
downloadgentoo-2-9c6d2f1afb9f31509d039d3abd1b756939659222.tar.gz
gentoo-2-9c6d2f1afb9f31509d039d3abd1b756939659222.tar.bz2
gentoo-2-9c6d2f1afb9f31509d039d3abd1b756939659222.zip
Version bump, probably much more stable than 0.13, *PLEASE TEST*
Diffstat (limited to 'sys-apps/ifplugd')
-rw-r--r--sys-apps/ifplugd/ChangeLog11
-rw-r--r--sys-apps/ifplugd/Manifest8
-rw-r--r--sys-apps/ifplugd/files/digest-ifplugd-0.151
-rw-r--r--sys-apps/ifplugd/files/gentoo-ifplugd-init-v261
-rw-r--r--sys-apps/ifplugd/files/gentoo-ifplugd.action-v233
-rw-r--r--sys-apps/ifplugd/ifplugd-0.15.ebuild56
6 files changed, 167 insertions, 3 deletions
diff --git a/sys-apps/ifplugd/ChangeLog b/sys-apps/ifplugd/ChangeLog
index 37641f907cee..6b50b33a21ee 100644
--- a/sys-apps/ifplugd/ChangeLog
+++ b/sys-apps/ifplugd/ChangeLog
@@ -1,6 +1,15 @@
# ChangeLog for sys-apps/ifplugd
# Copyright 2000-2003 Gentoo Technologies, Inc.; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/ifplugd/ChangeLog,v 1.2 2003/04/22 10:26:08 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/ifplugd/ChangeLog,v 1.3 2003/08/06 18:00:32 wmertens Exp $
+
+*ifplugd-0.15 (17 Mar 2003)
+
+ 06 Aug 2003; Wout Mertens <wmertens@gentoo.org> ebuild, files/gentoo-*-v2 :
+ Version bump, versioned action and init script. Init script now supports
+ suspend and resume.
+ Note: For it to work on my system (eepro100), I need to add -m mii to the
+ options, and add -a. I think. Testers welcome.
+ TODO: add an /etc/apm/event.d/ifplugd script
21 Mar 2003; Wout Mertens <wmertens@gentoo.org> :
Fixed the action script, otherwise ifplugd would die when dhcpcd
diff --git a/sys-apps/ifplugd/Manifest b/sys-apps/ifplugd/Manifest
index 509f6916f054..e0ad0e2ebf7a 100644
--- a/sys-apps/ifplugd/Manifest
+++ b/sys-apps/ifplugd/Manifest
@@ -1,5 +1,9 @@
-MD5 4d72f3d13bda242d6fd19cbe550999c0 ChangeLog 533
+MD5 74af88e5d011587ac5372ea29919ea0b ChangeLog 910
MD5 4e19530260f76c74e736256d0d23879d ifplugd-0.13-r1.ebuild 985
-MD5 1b861d571aed96fc06f363f318fa7f98 files/digest-ifplugd-0.13-r1 63
+MD5 d1f78e27833dd21a23b15076b03f1457 ifplugd-0.15.ebuild 1498
MD5 d6c3df70619631dd1f9b148e297a3037 files/ifplugd 901
+MD5 1b861d571aed96fc06f363f318fa7f98 files/digest-ifplugd-0.13-r1 63
+MD5 ed84e9ddf90cec9fd2bba39a6aca4652 files/digest-ifplugd-0.15 64
+MD5 0eb0757da8e71a8fcf16ee902f34b057 files/gentoo-ifplugd-init-v2 1312
+MD5 8783c5f9bf1ab4b8ea30d256a9911fc8 files/gentoo-ifplugd.action-v2 702
MD5 037a872cd311cdb8b2a9c25e6abda3db files/ifplugd.action 592
diff --git a/sys-apps/ifplugd/files/digest-ifplugd-0.15 b/sys-apps/ifplugd/files/digest-ifplugd-0.15
new file mode 100644
index 000000000000..d77ec5c1646c
--- /dev/null
+++ b/sys-apps/ifplugd/files/digest-ifplugd-0.15
@@ -0,0 +1 @@
+MD5 1439df09fc8e8c7516f08bf889742615 ifplugd-0.15.tar.gz 112731
diff --git a/sys-apps/ifplugd/files/gentoo-ifplugd-init-v2 b/sys-apps/ifplugd/files/gentoo-ifplugd-init-v2
new file mode 100644
index 000000000000..854e1c46b998
--- /dev/null
+++ b/sys-apps/ifplugd/files/gentoo-ifplugd-init-v2
@@ -0,0 +1,61 @@
+#!/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/gentoo-ifplugd-init-v2,v 1.1 2003/08/06 18:00:34 wmertens Exp $
+
+#NB: Config is in /etc/conf.d/ifplugd
+
+opts="stop start status suspend resume"
+
+IFPLUGD=/usr/sbin/ifplugd
+
+[ -z "$INTERFACES" ] && INTERFACES="eth0"
+[ "$INTERFACES" = "auto" ] && INTERFACES=`cat /proc/net/dev | awk '{ print $1 }' | grep ^eth | cut -d: -f1`
+
+# Handle starting for all interfaces
+# $1 is extra args, $2 is action name
+do_all_if() {
+ local status
+ for IF in $INTERFACES ; do
+ echo -n "$IF "
+ $IFPLUGD $1 -i $IF $ARGS
+ status=$?
+ [ $status -ne 0 ] && break
+ done
+ echo
+ eend $status "Couldn't $2 ifplugd for $IF"
+}
+
+start() {
+ einfon "Starting ifplugd: "
+ do_all_if "" start
+}
+
+stop() {
+ einfon "Stopping ifplugd: "
+ do_all_if -k stop
+ # Now we have to wait until it's actually down
+ local i=10
+ while [ $i -gt 0 ] && status | grep -q "running as"; do
+ i=$(( $i - 1 ))
+ sleep 1
+ done
+ if [ $i -eq 0 ]; then
+ eend 1 "Timeout exceeded, ifplugd won't die!"
+ fi
+}
+
+status() {
+ do_all_if -c "get status from"
+}
+
+suspend() {
+ einfon "Suspending ifplugd: "
+ do_all_if -S suspend
+}
+
+resume() {
+ einfon "Resuming ifplugd: "
+ do_all_if -R resume
+}
+# vim:ts=4
diff --git a/sys-apps/ifplugd/files/gentoo-ifplugd.action-v2 b/sys-apps/ifplugd/files/gentoo-ifplugd.action-v2
new file mode 100644
index 000000000000..99d142b8b109
--- /dev/null
+++ b/sys-apps/ifplugd/files/gentoo-ifplugd.action-v2
@@ -0,0 +1,33 @@
+#!/bin/sh
+# 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/gentoo-ifplugd.action-v2,v 1.1 2003/08/06 18:00:34 wmertens Exp $
+#
+# Gentoo-specific ifplugd.action
+#
+# This file gets called by ifplugd when it wants to bring an interface
+# up or down.
+#
+
+case "$2" in
+ up)
+ state=start
+ ;;
+ down)
+ state=stop
+ ;;
+ *)
+ echo "$0: wrong arguments"
+ echo "Call with <interface> <up|down>"
+ exit 1
+ ;;
+esac
+
+if [ -x /etc/init.d/net.$1 ]
+then
+ /etc/init.d/net.$1 --quiet $state
+ exit 0
+else
+ logger -t ifplugd.action "Error: Couldn't configure $1, no /etc/init.d/net.$1 script!"
+ exit 1
+fi
diff --git a/sys-apps/ifplugd/ifplugd-0.15.ebuild b/sys-apps/ifplugd/ifplugd-0.15.ebuild
new file mode 100644
index 000000000000..8f0699f209ff
--- /dev/null
+++ b/sys-apps/ifplugd/ifplugd-0.15.ebuild
@@ -0,0 +1,56 @@
+# 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/ifplugd-0.15.ebuild,v 1.1 2003/08/06 18:00:33 wmertens Exp $
+
+DESCRIPTION="Brings up/down ethernet ports automatically with cable detection"
+HOMEPAGE="http://www.stud.uni-hamburg.de/users/lennart/projects/ifplugd"
+SRC_URI="${HOMEPAGE}/${P}.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~x86 ~amd64"
+IUSE=""
+DEPEND="dev-libs/libdaemon"
+
+S=${WORKDIR}/${P}
+
+# Gentoo-provided scripts. Version is for the scripts, not ifplugd.
+INITSCRIPT=${FILESDIR}/gentoo-ifplugd-init-v2
+ACTIONSCRIPT=${FILESDIR}/gentoo-ifplugd.action-v2
+
+src_unpack() {
+ unpack ${A}
+
+ cp ${ACTIONSCRIPT} ${T}/ifplugd.action
+ cp ${INITSCRIPT} ${T}/ifplugd
+
+ cd ${S}
+ # This moves the default location for the script that handles
+ # calling the distro network scripts to /usr/sbin. The reason
+ # is that the user probably shouldn't mess with it.
+ sed -i~ 's:SYSCONFDIR"/ifplugd/:"/usr/sbin/:' src/ifplugd.c
+ # Remove the -w startup option; it gives an unwanted error return
+ sed -i~ 's/ -w//' conf/ifplugd.conf
+}
+
+src_compile() {
+ econf || die
+ emake || die
+}
+
+src_install() {
+ einstall || die
+ use doc && dohtml doc/*.html doc/*.css
+
+ # Fix init.d configuration
+ dodir /etc/conf.d
+ cd ${D}/etc
+ # rc config file
+ mv ifplugd/ifplugd.conf conf.d/ifplugd
+ rm -rf ifplugd/
+ rm -f init.d/ifplugd
+
+ dosbin ${T}/ifplugd.action
+
+ exeinto /etc/init.d
+ doexe ${T}/ifplugd
+}