summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorJouke Witteveen <j.witteveen@gmail.com>2012-04-09 13:33:34 +0200
committerJouke Witteveen <j.witteveen@gmail.com>2012-04-09 13:33:34 +0200
commite4cbb65924b7ad4f3c2a89a53a59dcda8257a29e (patch)
tree4c3c26ecba7aa72063c1587c10dba611d92b7ae1 /scripts
parentc6ad0bd1294bddb78d1b47e48e8ce7657f91e1df (diff)
downloadnetctl-e4cbb65924b7ad4f3c2a89a53a59dcda8257a29e.tar.gz
netctl-e4cbb65924b7ad4f3c2a89a53a59dcda8257a29e.tar.xz
Remove wireless-dbus and ethernet-iproute support
- wireless-dbus is not simple enough for netcfg - some contributed code was not used and the rest of the code had caught up functionality wise - we switched to iproute so we need to stop pretending it is an 'option' - it is no longer fatal in the ifplugd scrict to have multiple preferred profiles
Diffstat (limited to 'scripts')
-rw-r--r--scripts/ifplugd.action21
1 files changed, 8 insertions, 13 deletions
diff --git a/scripts/ifplugd.action b/scripts/ifplugd.action
index 573131d..ea3a16c 100644
--- a/scripts/ifplugd.action
+++ b/scripts/ifplugd.action
@@ -2,10 +2,7 @@
#
# ifplugd.action script for netcfg
-. /etc/rc.conf
-. /etc/rc.d/functions
. /usr/lib/network/network
-shopt -s extglob
case "$2" in
up)
@@ -17,11 +14,11 @@ case "$2" in
declare -a preferred_profiles
declare -a dhcp_profiles
declare -a static_profiles
- for profile in $(list_profiles); do (
- load_profile "$profile"
+ for profile in $(list_profiles); do
+ (
echo "loading $profile"
- [[ "$INTERFACE" != "$1" ]] && continue
- [[ "$CONNECTION" != @(ethernet|ethernet-iproute) ]] && continue
+ load_profile "$profile"
+ [[ "$INTERFACE" == "$1" && "$CONNECTION" == "ethernet" ]] || continue
checkyesno "${AUTO_WIRED:-no}" && exit 1 # user preferred AUTO profile
[[ "$IP" == "dhcp" ]] && exit 2 # dhcp profile
exit 3 # static profile
@@ -34,16 +31,14 @@ case "$2" in
done
if [[ ${#preferred_profiles[@]} > 1 ]]; then
echo "AUTO_WIRED flag for $1 set in more than one profile (${preferred_profiles[*]})"
- else
- for profile in "${preferred_profiles[@]}" "${dhcp_profiles[@]}" "${static_profiles[@]}"; do (
- netcfg "$profile" && exit 1
- exit 0
- ) || exit 0; done
fi
+ for profile in "${preferred_profiles[@]}" "${dhcp_profiles[@]}" "${static_profiles[@]}"; do
+ profile_up "$profile" && exit 0
+ done
;;
down)
if check_iface "$1"; then
- netcfg -i "$1" && exit 0
+ interface_down "$1" && exit 0
fi
;;
*)