#!/bin/sh # # This ifdown wrapper takes care of profiles associated with the # physical network interface # # Move your real /sbin/ifdown to /sbin/real/ifdown # (you cannot rename it, since busybox identifies the command by its name) # # by Stefan Tomanek (stefan@pico.ruhr.de) # 2005-05-03 IFDOWN="/sbin/real/ifdown" IFSTATE="/var/run/ifstate" ARGS="" for i in $@; do if grep -q "^$i=" $IFSTATE; then #echo "Token $i is a network device without profile" PROFILE=$(grep "^$i=" $IFSTATE| cut -d= -f2) ARGS="$ARGS $i=$PROFILE" else ARGS="$ARGS $i" fi done echo "Calling »$IFDOWN $ARGS«" $IFDOWN $ARGS