PKGBUILDs/extra/ifplugd/ifplugd.action
2009-10-09 21:23:22 -05:00

26 lines
457 B
Bash

#!/bin/sh
#
# ifplugd.action script for Arch Linux
. /etc/rc.conf
. /etc/rc.d/functions
case "$2" in
up)
/etc/rc.d/network ifup $1
# ugly way to load up gateway, since
# al's net configuration doesn't associate
# gateways with specific interfaces
/sbin/route add $gateway
;;
down)
/etc/rc.d/network ifdown $1
# same as up...
/sbin/route del $1
;;
*)
echo "Wrong arguments" > /dev/stderr
;;
esac
exit 1