summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /sys-apps/ifplugd/files
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'sys-apps/ifplugd/files')
-rw-r--r--sys-apps/ifplugd/files/ifplugd-0.28-interface.patch13
-rw-r--r--sys-apps/ifplugd/files/ifplugd-0.28-nlapi.diff12
-rw-r--r--sys-apps/ifplugd/files/ifplugd-0.28-noip.patch21
-rw-r--r--sys-apps/ifplugd/files/ifplugd-0.28-strictalias.patch63
-rw-r--r--sys-apps/ifplugd/files/ifplugd.action55
5 files changed, 164 insertions, 0 deletions
diff --git a/sys-apps/ifplugd/files/ifplugd-0.28-interface.patch b/sys-apps/ifplugd/files/ifplugd-0.28-interface.patch
new file mode 100644
index 000000000000..9c2de464bbde
--- /dev/null
+++ b/sys-apps/ifplugd/files/ifplugd-0.28-interface.patch
@@ -0,0 +1,13 @@
+--- src/interface.c 2004/12/19 00:08:01 114
++++ src/interface.c 2006/03/07 13:15:11 133
+@@ -22,9 +22,9 @@
+ #include <config.h>
+ #endif
+
++#include <sys/types.h>
+ #include <linux/sockios.h>
+ #include <linux/if_ether.h>
+-#include <sys/types.h>
+ #include <sys/socket.h>
+ #include <sys/ioctl.h>
+ #include <linux/if.h>
diff --git a/sys-apps/ifplugd/files/ifplugd-0.28-nlapi.diff b/sys-apps/ifplugd/files/ifplugd-0.28-nlapi.diff
new file mode 100644
index 000000000000..b640543eebc9
--- /dev/null
+++ b/sys-apps/ifplugd/files/ifplugd-0.28-nlapi.diff
@@ -0,0 +1,12 @@
+diff -urN src/nlapi.c src/nlapi.c
+--- src/nlapi.c 2004-12-20 08:39:14.682706517 -0500
++++ src/nlapi.c 2004-12-20 08:39:50.185734092 -0500
+@@ -86,7 +86,7 @@
+ for (; bytes > 0; p = NLMSG_NEXT(p, bytes)) {
+ struct callback_info *c;
+
+- if (!NLMSG_OK(p, bytes) || (size_t) bytes < sizeof(struct nlmsghdr) || (size_t) bytes < p->nlmsg_len) {
++ if (!NLMSG_OK(p, (size_t) bytes) || (size_t) bytes < sizeof(struct nlmsghdr) || (size_t) bytes < (size_t) p->nlmsg_len) {
+ daemon_log(LOG_ERR, "NLAPI: Packet too small or truncated!\n");
+ return -1;
+ }
diff --git a/sys-apps/ifplugd/files/ifplugd-0.28-noip.patch b/sys-apps/ifplugd/files/ifplugd-0.28-noip.patch
new file mode 100644
index 000000000000..5daa4534eb49
--- /dev/null
+++ b/sys-apps/ifplugd/files/ifplugd-0.28-noip.patch
@@ -0,0 +1,21 @@
+[PATCH] Allow ifplugd to run when no TCP/IP is available
+
+This simple patch create AF_LOCAL socket instead of AF_INET so if TCP/IP
+is not linked into kernel it still works.
+
+Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
+
+---
+
+diff -urNp ifplugd-0.28.org/src/ifplugd.c ifplugd-0.28/src/ifplugd.c
+--- ifplugd-0.28.org/src/ifplugd.c 2005-06-04 22:21:51.000000000 +0300
++++ ifplugd-0.28/src/ifplugd.c 2007-10-30 05:22:53.000000000 +0200
+@@ -409,7 +409,7 @@ void work(void) {
+ break;
+ }
+
+- if ((fd = socket(AF_INET, SOCK_DGRAM, 0)) < 0) {
++ if ((fd = socket(AF_LOCAL, SOCK_DGRAM, 0)) < 0) {
+ daemon_log(LOG_ERR, "socket(): %s", strerror(errno));
+ goto finish;
+ }
diff --git a/sys-apps/ifplugd/files/ifplugd-0.28-strictalias.patch b/sys-apps/ifplugd/files/ifplugd-0.28-strictalias.patch
new file mode 100644
index 000000000000..3c5de8a2e731
--- /dev/null
+++ b/sys-apps/ifplugd/files/ifplugd-0.28-strictalias.patch
@@ -0,0 +1,63 @@
+--- src/interface.c.orig 2007-03-23 13:29:40.000000000 +0000
++++ src/interface.c 2007-03-23 13:30:05.000000000 +0000
+@@ -89,6 +89,10 @@
+
+ interface_status_t interface_detect_beat_mii(int fd, char *iface) {
+ struct ifreq ifr;
++ union {
++ caddr_t *data;
++ unsigned short *usz;
++ } ifd;
+
+ if (interface_auto_up)
+ interface_up(fd, iface);
+@@ -103,7 +107,8 @@
+ return IFSTATUS_ERR;
+ }
+
+- ((unsigned short*) &ifr.ifr_data)[1] = 1;
++ ifd.data = &ifr.ifr_data;
++ *++ifd.usz = 1;
+
+ if (ioctl(fd, SIOCGMIIREG, &ifr) == -1) {
+ if (interface_do_message)
+@@ -112,12 +117,17 @@
+ return IFSTATUS_ERR;
+ }
+
+- return (((unsigned short*) &ifr.ifr_data)[3] & 0x0004) ? IFSTATUS_UP : IFSTATUS_DOWN;
++ ifd.usz += 2;
++ return (*ifd.usz & 0x0004) ? IFSTATUS_UP : IFSTATUS_DOWN;
+ }
+
+ interface_status_t interface_detect_beat_priv(int fd, char *iface) {
+ struct ifreq ifr;
+-
++ union {
++ caddr_t *data;
++ unsigned short *usz;
++ } ifd;
++
+ if (interface_auto_up)
+ interface_up(fd, iface);
+
+@@ -131,7 +141,8 @@
+ return IFSTATUS_ERR;
+ }
+
+- ((unsigned short*) &ifr.ifr_data)[1] = 1;
++ ifd.data = &ifr.ifr_data;
++ *++ifd.usz = 1;
+
+ if (ioctl(fd, SIOCDEVPRIVATE+1, &ifr) == -1) {
+ if (interface_do_message)
+@@ -140,7 +151,8 @@
+ return IFSTATUS_ERR;
+ }
+
+- return (((unsigned short*) &ifr.ifr_data)[3] & 0x0004) ? IFSTATUS_UP : IFSTATUS_DOWN;
++ ifd.usz += 2;
++ return (*ifd.usz & 0x0004) ? IFSTATUS_UP : IFSTATUS_DOWN;
+ }
+
+ interface_status_t interface_detect_beat_ethtool(int fd, char *iface) {
diff --git a/sys-apps/ifplugd/files/ifplugd.action b/sys-apps/ifplugd/files/ifplugd.action
new file mode 100644
index 000000000000..ba4cfd7d20b9
--- /dev/null
+++ b/sys-apps/ifplugd/files/ifplugd.action
@@ -0,0 +1,55 @@
+#!/bin/sh
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+#
+# Gentoo-specific ifplugd.action
+#
+# This file gets called by ifplugd when it wants to bring an interface
+# up or down.
+#
+
+if grep -q initng /proc/1/cmdline
+then
+ EXEC="/sbin/ngc"
+ INITNG="yes"
+else
+ EXEC="/etc/init.d/net.$1"
+ INITNG="no"
+fi
+
+case "$2" in
+ up)
+ if [ "${INITNG}" = "yes" ]
+ then
+ ARGS="-u net/$1"
+ else
+ ARGS="--quiet start"
+ fi
+ ;;
+ down)
+ if [ "${INITNG}" = "yes" ]
+ then
+ ARGS="-d net/$1"
+ else
+ ARGS="--quiet stop"
+ fi
+ ;;
+ *)
+ echo "$0: wrong arguments" >&2
+ echo "Call with <interface> <up|down>" >&2
+ exit 1
+ ;;
+esac
+
+export IN_BACKGROUND=true
+
+if [ -x "${EXEC}" ]
+then
+ ${EXEC} ${ARGS}
+ exit 0
+else
+ logger -t ifplugd.action "Error: Couldn't configure $1, no ${EXEC} !"
+ exit 1
+fi
+
+# vim: set ts=4