diff options
Diffstat (limited to 'sys-apps/ifplugd')
-rw-r--r-- | sys-apps/ifplugd/Changelog | 8 | ||||
-rw-r--r-- | sys-apps/ifplugd/files/digest-ifplugd-0.13 | 1 | ||||
-rw-r--r-- | sys-apps/ifplugd/files/ifplugd | 36 | ||||
-rw-r--r-- | sys-apps/ifplugd/files/ifplugd.action | 29 | ||||
-rw-r--r-- | sys-apps/ifplugd/ifplugd-0.13.ebuild | 40 |
5 files changed, 114 insertions, 0 deletions
diff --git a/sys-apps/ifplugd/Changelog b/sys-apps/ifplugd/Changelog new file mode 100644 index 000000000000..17e65ebaae2c --- /dev/null +++ b/sys-apps/ifplugd/Changelog @@ -0,0 +1,8 @@ +# ChangeLog for <CATEGORY>/<PACKAGE_NAME> +# Copyright 2000-2003 Gentoo Technologies, Inc.; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/sys-apps/ifplugd/Changelog,v 1.1 2003/03/17 15:24:17 wmertens Exp $ + +*ifplugd-0.13 (17 Mar 2003) + + 17 Mar 2003; Wout Mertens <wmertens@gentoo.org> : + Initial ebuild. 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 diff --git a/sys-apps/ifplugd/ifplugd-0.13.ebuild b/sys-apps/ifplugd/ifplugd-0.13.ebuild new file mode 100644 index 000000000000..f4fc87157139 --- /dev/null +++ b/sys-apps/ifplugd/ifplugd-0.13.ebuild @@ -0,0 +1,40 @@ +# 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.13.ebuild,v 1.1 2003/03/17 15:24:17 wmertens Exp $ + +DESCRIPTION="Brings up/down network 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" +IUSE="" +DEPEND="" +#RDEPEND="" + +S=${WORKDIR}/ifplugd + +src_unpack() { + unpack ${A} + + cd ${S} + perl -pi.orig -e 's:^CFLAGS=.*$:CFLAGS='"${CFLAGS}:" Makefile + perl -pi.orig -e 's:/etc/ifplugd/ifplugd.action:/usr/sbin/ifplugd.action:' ifplugd.c +} + +src_compile() { + emake +} + +src_install() { + dosbin ifplugd ${FILESDIR}/ifplugd.action ifstatus + doman ifplugd.8 ifstatus.8 + + dodir /etc/conf.d + mv ifplugd.conf ${D}/etc/conf.d/ifplugd + + exeinto /etc/init.d + doexe ${FILESDIR}/ifplugd + + dodoc README SUPPORTED_DRIVERS FAQ NEWS +} |