Move all to deprecated folder.

This commit is contained in:
2016-11-16 21:57:57 +01:00
parent 01738a7684
commit 05de7d6c04
9777 changed files with 0 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
Preserve the cflags settings, because buildroot clobbers them.
--- a/Makefile 2010-10-05 00:06:38.000000000 -0700
+++ b/Makefile 2010-10-05 00:15:27.000000000 -0700
@@ -11,11 +11,14 @@ mandir ?= $(prefix)/usr/share/man
install_opts :=
-CFLAGS += -Wall -std=gnu99 -DNP_ETC_DIR='"$(etcdir)"' \
+NETPLUG_CFLAGS += -Wall -std=gnu99 -DNP_ETC_DIR='"$(etcdir)"' \
-DNP_SCRIPT_DIR='"$(scriptdir)"' -ggdb3 -O3 -DNP_VERSION='"$(version)"'
+%.o: %.c
+ $(CC) $(NETPLUG_CFLAGS) $(CFLAGS) -c -o $@ $<
+
netplugd: config.o netlink.o lib.o if_info.o main.o
- $(CC) $(LDFLAGS) -o $@ $^
+ $(CC) $(LDFLAGS) -o $@ $(NETPLUG_CFLAGS) $^
install:
install -d $(install_opts) -m 755 \

View File

@@ -0,0 +1,8 @@
config BR2_PACKAGE_NETPLUG
bool "netplug"
depends on BR2_USE_MMU # fork()
help
A Linux daemon that manages network interfaces in
response to network cables being plugged in and out.
http://www.red-bean.com/~bos/

View File

@@ -0,0 +1,69 @@
#!/bin/sh
#
# netplugd This shell script takes care of starting and stopping
# the network plug management daemon.
#
# chkconfig: - 11 89
# description: netplugd is a daemon for managing non-static network \
# interfaces.
# processname: netplugd
# pidfile: /var/run/netplugd.pid
# Copyright 2003 Key Research, Inc.
# Source function library.
if [ -f /etc/init.d/functions ]; then
. /etc/init.d/functions
elif [ -f /etc/rc.d/init.d/functions ]; then
. /etc/rc.d/init.d/functions
fi
# Source networking configuration.
if [ -f /etc/sysconfig/network ]; then
. /etc/sysconfig/network
# Check that networking is up.
[ ${NETWORKING} = "no" ] && exit 0
elif [ ! -f /etc/network/interfaces ]; then
# No network support
exit 0
fi
[ -x /sbin/netplugd ] || exit 0
if [ -f /etc/sysconfig/netplugd ]; then
. /etc/sysconfig/netplugd
fi
# See how we were called.
case "$1" in
start)
# Start daemon.
printf "Starting network plug daemon: "
start-stop-daemon -S -q -p /var/run/netplugd.pid -x /sbin/netplugd ${NETPLUGDARGS}
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/netplugd
;;
stop)
# Stop daemon.
printf "Shutting down network plug daemon: "
start-stop-daemon -K -n netplugd
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/netplugd
;;
restart|reload)
$0 stop
$0 start
;;
condrestart)
[ -f /var/lock/subsys/netplugd ] && $0 restart || :
;;
*)
echo "Usage: $0 {start|stop|restart}"
RETVAL=1
;;
esac
exit $RETVAL

View File

@@ -0,0 +1,57 @@
#!/bin/sh
#
# netplug - policy agent for netplugd
#
# Copyright 2003 Key Research, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License, version 2, as
# published by the Free Software Foundation. You are forbidden from
# redistributing or modifying it under the terms of any other license,
# including other versions of the GNU General Public License.
#
# This program 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.
PATH=/usr/bin:/bin:/usr/sbin:/sbin
export PATH
dev="$1"
action="$2"
case "$action" in
in)
if [ -x /sbin/ifup ]; then
exec /sbin/ifup $dev
else
echo "Please teach me how to plug in an interface!" 1>&2
exit 1
fi
;;
out)
if [ -x /sbin/ifdown ]; then
# At least on Fedora Core 1, the call to ip addr flush infloops
# /sbin/ifdown $dev && exec /sbin/ip addr flush $dev
exec /sbin/ifdown $dev
else
echo "Please teach me how to unplug an interface!" 1>&2
exit 1
fi
;;
probe)
# exec /sbin/ip link set $dev up >/dev/null 2>&1
if [ -x /sbin/ifconfig ]; then
exec /sbin/ifconfig $dev up >/dev/null 2>&1
else
echo "Failed to probe an interface!" 1>&2
exit 1
fi
;;
*)
echo "I have been called with a funny action of '%s'!" 1>&2
exit 1
;;
esac

View File

@@ -0,0 +1,2 @@
# Locally calculated
sha256 5180dfd9a7d3d0633a027b0a04f01b45a6a64623813cd48bd54423b90814864e netplug-1.2.9.2.tar.bz2

View File

@@ -0,0 +1,34 @@
################################################################################
#
# netplug
#
################################################################################
NETPLUG_VERSION = 1.2.9.2
NETPLUG_SOURCE = netplug-$(NETPLUG_VERSION).tar.bz2
NETPLUG_SITE = http://www.red-bean.com/~bos/netplug
NETPLUG_LICENSE = GPLv2
NETPLUG_LICENSE_FILES = COPYING
define NETPLUG_BUILD_CMDS
$(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D)
endef
define NETPLUG_INSTALL_TARGET_CMDS
$(MAKE) DESTDIR=$(TARGET_DIR) -C $(@D) install
endef
define NETPLUG_INSTALL_INIT_SYSV
$(INSTALL) -m 0755 -D package/netplug/S29netplug \
$(TARGET_DIR)/etc/init.d/S29netplug
endef
define NETPLUG_INSTALL_INIT_SYSTEMD
$(INSTALL) -D -m 644 package/netplug/netplug.service \
$(TARGET_DIR)/usr/lib/systemd/system/netplug.service
mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
ln -sf ../../../../usr/lib/systemd/system/netplug.service \
$(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/netplug.service
endef
$(eval $(generic-package))

View File

@@ -0,0 +1,10 @@
[Unit]
Description=Network cable hotplug management daemon
After=syslog.target network.target
[Service]
ExecStart=/sbin/netplugd -F
Restart=always
[Install]
WantedBy=multi-user.target