summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2009-02-08 13:56:21 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2009-02-08 13:56:21 +0000
commit5799357b9a16e53bb89362bc018a5e41d1b55957 (patch)
tree778c764e0878f7649c0efab659fa96b0ba72a74b
parentcd4590307bc18190f3c1ee94a413145e1509b76b (diff)
removed ifenslave as its provided by busybox nowdays
-rw-r--r--Makefile3
-rwxr-xr-xifenslave59
2 files changed, 1 insertions, 61 deletions
diff --git a/Makefile b/Makefile
index f8bb287..4aad13d 100644
--- a/Makefile
+++ b/Makefile
@@ -10,8 +10,7 @@ ETC_FILES =$(GENERATED_FILES) group fstab inittab nsswitch.conf \
passwd protocols services shadow shells issue mdev.conf \
crontab sysctl.conf
CONFD_FILES = $(addprefix conf.d/, cron hwclock localinit rdate syslog tuntap vlan watchdog)
-SBIN_FILES =runscript-alpine.sh functions.sh rc_add rc_delete rc_status\
- ifenslave
+SBIN_FILES =runscript-alpine.sh functions.sh rc_add rc_delete rc_status
RC_SH_FILES =rc-services.sh
UDHCPC_FILES =default.script
LIB_MDEV_FILES =ide_links sd_links subdir_dev usbdev dvbdev
diff --git a/ifenslave b/ifenslave
deleted file mode 100755
index 8110e8c..0000000
--- a/ifenslave
+++ /dev/null
@@ -1,59 +0,0 @@
-#!/bin/sh
-
-PROGRAM=$(basename $0)
-
-die() {
- echo $* >&2
- exit 1
-}
-
-usage() {
- echo "Usage: $PROGRAM [-d] <master-if> <slave-if> ...
-
-Options:
- -d Detach slaves
-
-"
- exit 1
-}
-
-
-OPER='+'
-while getopts "dh" opt ; do
- case $opt in
- d) OPER="-";;
- h) usage;;
- esac
-done
-
-shift $(( $OPTIND - 1 ))
-
-[ $# -lt 2 ] && usage
-
-bondif=$1
-shift
-
-#check if $bondif is a bonding master
-unset found
-for i in $(cat /sys/class/net/bonding_masters) ; do
- [ "$i" = "$bondif" ] && found=1
-done
-[ "$found" != 1 ] && die "$bondif is not a bonding master. Aborting"
-
-while [ $# -gt 0 ] ; do
- if [ "$OPER" = "+" ] && [ -d /sys/class/net/$1/master ] ; then
- echo "Interface '$1' is already a slave. Skipping" >&2
- elif [ -d /sys/class/net/$1 ]; then
- # flush ip adresses and set link down before adding
- if [ "$OPER" = '+' ]; then
- ip addr flush dev $1 >/dev/null 2>&1
- ip link set dev $1 down #linux will bring link up
- fi
- ( echo "${OPER}${1}" > /sys/class/net/$bondif/bonding/slaves ) >/dev/null \
- || echo "Slave '$1' failed. Skipping" >&2
- else
- echo "Slave '$1' is not a network interface. Skipping" >&2
- fi
- shift
-done
-