summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoy Marples <uberlord@gentoo.org>2005-09-02 11:11:21 +0000
committerRoy Marples <uberlord@gentoo.org>2005-09-02 11:11:21 +0000
commite7460df8d11a8b5a213fe4921151930e83e83bfb (patch)
treef9b529d2bbfdfcbefb72b0aae02554990c3b03ae /sys-apps/netplug
parentFix reconfig script wrt bug #104495. (diff)
downloadhistorical-e7460df8d11a8b5a213fe4921151930e83e83bfb.tar.gz
historical-e7460df8d11a8b5a213fe4921151930e83e83bfb.tar.bz2
historical-e7460df8d11a8b5a213fe4921151930e83e83bfb.zip
Initial import
Package-Manager: portage-2.0.51.22-r2
Diffstat (limited to 'sys-apps/netplug')
-rw-r--r--sys-apps/netplug/ChangeLog11
-rw-r--r--sys-apps/netplug/Manifest6
-rw-r--r--sys-apps/netplug/files/digest-netplug-1.2.91
-rwxr-xr-xsys-apps/netplug/files/netplug62
-rw-r--r--sys-apps/netplug/files/netplug-1.2.9-gcc4.patch11
-rw-r--r--sys-apps/netplug/metadata.xml9
-rw-r--r--sys-apps/netplug/netplug-1.2.9.ebuild45
7 files changed, 145 insertions, 0 deletions
diff --git a/sys-apps/netplug/ChangeLog b/sys-apps/netplug/ChangeLog
new file mode 100644
index 000000000000..3441609b6704
--- /dev/null
+++ b/sys-apps/netplug/ChangeLog
@@ -0,0 +1,11 @@
+# ChangeLog for sys-apps/netplug
+# Copyright 1999-2005 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/netplug/ChangeLog,v 1.1 2005/09/02 11:11:20 uberlord Exp $
+
+*netplug-1.2.9 (02 Sep 2005)
+
+ 02 Sep 2005; Roy Marples <uberlord@gentoo.org>
+ +files/netplug-1.2.9-gcc4.patch, +files/netplug, +metadata.xml,
+ +netplug-1.2.9.ebuild:
+ Initial import
+
diff --git a/sys-apps/netplug/Manifest b/sys-apps/netplug/Manifest
new file mode 100644
index 000000000000..f17015035631
--- /dev/null
+++ b/sys-apps/netplug/Manifest
@@ -0,0 +1,6 @@
+MD5 b853b98c8970d127d0277672def39857 netplug-1.2.9.ebuild 1138
+MD5 0712c43ca5596c718121fb8c70b7728a ChangeLog 395
+MD5 019c37ba80d6e01ea4d01f93e0565bd3 metadata.xml 333
+MD5 27d521bff4ea79d801eca92b740a0cd4 files/netplug 1101
+MD5 a310e86707b8f304165f61160b3ce215 files/netplug-1.2.9-gcc4.patch 362
+MD5 e5ca23da76196da2b350d78793138426 files/digest-netplug-1.2.9 65
diff --git a/sys-apps/netplug/files/digest-netplug-1.2.9 b/sys-apps/netplug/files/digest-netplug-1.2.9
new file mode 100644
index 000000000000..b895ad93b788
--- /dev/null
+++ b/sys-apps/netplug/files/digest-netplug-1.2.9
@@ -0,0 +1 @@
+MD5 3bc8062d8033e3f897b015f2889ce5a9 netplug-1.2.9.tar.bz2 21786
diff --git a/sys-apps/netplug/files/netplug b/sys-apps/netplug/files/netplug
new file mode 100755
index 000000000000..7b4094954c7d
--- /dev/null
+++ b/sys-apps/netplug/files/netplug
@@ -0,0 +1,62 @@
+#!/bin/sh
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/netplug/files/netplug,v 1.1 2005/09/02 11:11:21 uberlord Exp $
+#
+# Gentoo-specific netplug script
+#
+# This file gets called by netplug when it wants to bring an interface
+# up or down.
+#
+
+IFACE="$1"
+ACTION="$2"
+
+if grep -q initng /proc/1/cmdline
+then
+ EXEC="ngc"
+ INITNG="yes"
+else
+ EXEC="/etc/init.d/net.${IFACE}"
+ INITNG="no"
+fi
+
+case "${ACTION}" in
+ in)
+ if [ "${INITNG}" = "yes" ]
+ then
+ ARGS="-u net/${IFACE}"
+ else
+ ARGS="--quiet start"
+ fi
+ ;;
+ out)
+ if [ "${INITNG}" = "yes" ]
+ then
+ ARGS="-d net/${IFACE}"
+ else
+ ARGS="--quiet stop"
+ fi
+ ;;
+ probe)
+ # Do nothing as we should already be up
+ ;;
+ *)
+ 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
+
+# vim: set ts=4
diff --git a/sys-apps/netplug/files/netplug-1.2.9-gcc4.patch b/sys-apps/netplug/files/netplug-1.2.9-gcc4.patch
new file mode 100644
index 000000000000..6a9d420400a7
--- /dev/null
+++ b/sys-apps/netplug/files/netplug-1.2.9-gcc4.patch
@@ -0,0 +1,11 @@
+--- netlink.c.orig 2005-09-02 11:06:57.045223697 +0100
++++ netlink.c 2005-09-02 11:11:30.637151062 +0100
+@@ -284,7 +284,7 @@
+ exit(1);
+ }
+
+- int addr_len = sizeof(addr);
++ socklen_t addr_len = sizeof(addr);
+
+ if (getsockname(fd, (struct sockaddr *) &addr, &addr_len) == -1) {
+ do_log(LOG_ERR, "Could not get socket details: %m");
diff --git a/sys-apps/netplug/metadata.xml b/sys-apps/netplug/metadata.xml
new file mode 100644
index 000000000000..dd5f9eb40406
--- /dev/null
+++ b/sys-apps/netplug/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>uberlord@gentoo.org</email>
+ <name>Roy Marples</name>
+ </maintainer>
+ <longdescription>Brings up/down ethernet ports automatically with cable detection</longdescription>
+</pkgmetadata>
diff --git a/sys-apps/netplug/netplug-1.2.9.ebuild b/sys-apps/netplug/netplug-1.2.9.ebuild
new file mode 100644
index 000000000000..34df70bb7e8b
--- /dev/null
+++ b/sys-apps/netplug/netplug-1.2.9.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/netplug/netplug-1.2.9.ebuild,v 1.1 2005/09/02 11:11:20 uberlord Exp $
+
+inherit eutils
+DESCRIPTION="Brings up/down ethernet ports automatically with cable detection"
+HOMEPAGE="http://www.red-bean.com/~bos/"
+SRC_URI="http://www.red-bean.com/~bos/netplug/${P}.tar.bz2"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+hax_bitkeeper() {
+ # the makefiles have support for bk ...
+ # basically we have to do this or bk will try to write
+ # to files in /opt/bitkeeper causing sandbox violations ;(
+ mkdir "${T}/fakebin"
+ echo "#!/bin/sh"$'\n'"exit 1" > "${T}/fakebin/bk"
+ chmod a+x "${T}/fakebin/bk"
+ export PATH="${T}/fakebin:${PATH}"
+}
+
+src_unpack() {
+ unpack "${A}"
+ cd "${S}"
+
+ # Use correct structure for getsockname arg 3
+ epatch "${FILESDIR}/netplug-1.2.9-gcc4.patch"
+}
+
+src_compile() {
+ hax_bitkeeper
+ emake || die "emake failed"
+}
+
+src_install() {
+ into /
+ dosbin netplugd
+ doman man/man8/netplugd.8
+
+ dodir /etc/netplug.d
+ exeinto /etc/netplug.d
+ doexe "${FILESDIR}/netplug"
+}