diff options
author | Roy Marples <uberlord@gentoo.org> | 2005-09-02 11:11:21 +0000 |
---|---|---|
committer | Roy Marples <uberlord@gentoo.org> | 2005-09-02 11:11:21 +0000 |
commit | 7484f10a9a1421d3187126afba9fdec1c4424318 (patch) | |
tree | ec2095685a69be5e3bbc9598511dfcfc32f0a040 /sys-apps/netplug/files | |
parent | Fix reconfig script wrt bug #104495. (diff) | |
download | gentoo-2-7484f10a9a1421d3187126afba9fdec1c4424318.tar.gz gentoo-2-7484f10a9a1421d3187126afba9fdec1c4424318.tar.bz2 gentoo-2-7484f10a9a1421d3187126afba9fdec1c4424318.zip |
Initial import
(Portage version: 2.0.51.22-r2)
Diffstat (limited to 'sys-apps/netplug/files')
-rw-r--r-- | sys-apps/netplug/files/digest-netplug-1.2.9 | 1 | ||||
-rwxr-xr-x | sys-apps/netplug/files/netplug | 62 | ||||
-rw-r--r-- | sys-apps/netplug/files/netplug-1.2.9-gcc4.patch | 11 |
3 files changed, 74 insertions, 0 deletions
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"); |