diff options
author | Wout Mertens <wmertens@gentoo.org> | 2003-03-21 15:58:05 +0000 |
---|---|---|
committer | Wout Mertens <wmertens@gentoo.org> | 2003-03-21 15:58:05 +0000 |
commit | b2c7144cab2b9e0a44c7f67d077b8fb7de494157 (patch) | |
tree | 40f4a0ddfc926513e392ae0dab68a0e29238a5e3 /sys-apps/ifplugd | |
parent | new version+old file ->mirror://gentoo (diff) | |
download | historical-b2c7144cab2b9e0a44c7f67d077b8fb7de494157.tar.gz historical-b2c7144cab2b9e0a44c7f67d077b8fb7de494157.tar.bz2 historical-b2c7144cab2b9e0a44c7f67d077b8fb7de494157.zip |
Fix of the action script + declared stable
Diffstat (limited to 'sys-apps/ifplugd')
-rw-r--r-- | sys-apps/ifplugd/ChangeLog | 13 | ||||
-rw-r--r-- | sys-apps/ifplugd/files/digest-ifplugd-0.13-r1 | 1 | ||||
-rw-r--r-- | sys-apps/ifplugd/files/ifplugd | 17 | ||||
-rw-r--r-- | sys-apps/ifplugd/files/ifplugd.action | 41 | ||||
-rw-r--r-- | sys-apps/ifplugd/ifplugd-0.13-r1.ebuild | 40 |
5 files changed, 85 insertions, 27 deletions
diff --git a/sys-apps/ifplugd/ChangeLog b/sys-apps/ifplugd/ChangeLog new file mode 100644 index 000000000000..f0e3cd964e6e --- /dev/null +++ b/sys-apps/ifplugd/ChangeLog @@ -0,0 +1,13 @@ +# 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/21 15:58:05 wmertens Exp $ + + 21 Mar 2003; Wout Mertens <wmertens@gentoo.org> : + Fixed the action script, otherwise ifplugd would die when dhcpcd + failed. Also put it in stable, because it has no downstream + dependencies and it works for me. + +*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-r1 b/sys-apps/ifplugd/files/digest-ifplugd-0.13-r1 new file mode 100644 index 000000000000..8f15d23f8242 --- /dev/null +++ b/sys-apps/ifplugd/files/digest-ifplugd-0.13-r1 @@ -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 index 66f0249fa8f7..d206f8b1e474 100644 --- a/sys-apps/ifplugd/files/ifplugd +++ b/sys-apps/ifplugd/files/ifplugd @@ -1,7 +1,7 @@ #!/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 $ +# $Header: /var/cvsroot/gentoo-x86/sys-apps/ifplugd/files/ifplugd,v 1.2 2003/03/21 15:58:05 wmertens Exp $ #NB: Config is in /etc/conf.d/ifplugd @@ -15,11 +15,15 @@ start() { for IF in $INTERFACES ; do echo -n "$IF " $IFPLUGD -i $IF $ARGS - if [ $? -ne 0 ]; then - eend $? "Problem starting for $IF" - return 1 - fi + # You can't trust the exit code, so we pretend it works + # status=$? + # if [ $status -ne 0 ]; then + # echo + # eend $status "Problem starting for $IF" + # return 1 + # fi done + echo eend 0 } @@ -27,8 +31,9 @@ stop() { einfon "Stopping ifplugd: " for IF in $INTERFACES ; do echo -n "$IF " - $IFPLUGD -k -i $IF || ewarn "Couldn't stop instance for $IF" + $IFPLUGD -k -i $IF done + echo eend 0 } diff --git a/sys-apps/ifplugd/files/ifplugd.action b/sys-apps/ifplugd/files/ifplugd.action index 80d961e0648a..a5b8feb896e1 100644 --- a/sys-apps/ifplugd/files/ifplugd.action +++ b/sys-apps/ifplugd/files/ifplugd.action @@ -1,29 +1,28 @@ #!/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/ifplugd.action,v 1.2 2003/03/21 15:58:05 wmertens Exp $ # -# This file is part of ifplugd, and adapted for use in Gentoo Linux. +# Gentoo-specific ifplugd.action # -# 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. +# This file gets called by ifplugd when it wants to bring an interface +# up or down. # -# 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 +case "$2" in + up) + state=start + ;; + down) + state=stop + ;; + *) + echo "$0: wrong arguments" + echo "Call with <interface> <up|down>" + exit 1 + ;; +esac -[ "$2" = "up" ] && /etc/init.d/net.$1 start > /dev/null -[ "$2" = "down" ] && /etc/init.d/net.$1 stop > /dev/null +[ -x /etc/init.d/net.$1 ] && /etc/init.d/net.$1 --quiet $state exit 0 diff --git a/sys-apps/ifplugd/ifplugd-0.13-r1.ebuild b/sys-apps/ifplugd/ifplugd-0.13-r1.ebuild new file mode 100644 index 000000000000..c76156e90f14 --- /dev/null +++ b/sys-apps/ifplugd/ifplugd-0.13-r1.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-r1.ebuild,v 1.1 2003/03/21 15:58:05 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" +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 +} |