aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2007-11-22 13:25:20 +0000
committerRoy Marples <roy@marples.name>2007-11-22 13:25:20 +0000
commite31e930825b2e1d122460b42d1a52d1aa8c13f5f (patch)
tree1ed684d95df0e0eda8a48ac4a9a5b45127c4394d
parentee61f4630920d576d7c875e72547c98e227e7c66 (diff)
Support FreeBSD ifconfig_foo
-rw-r--r--net.BSD/ifconfig.sh32
1 files changed, 32 insertions, 0 deletions
diff --git a/net.BSD/ifconfig.sh b/net.BSD/ifconfig.sh
index dee85f3d..5b32f4b2 100644
--- a/net.BSD/ifconfig.sh
+++ b/net.BSD/ifconfig.sh
@@ -190,4 +190,36 @@ _has_carrier() {
[ -z "${s}" -o "${s}" = "active" -o "${s}" = "associated" ]
}
+ifconfig_pre_start() {
+ local config="$(_get_array "ifconfig_${IFVAR}")" conf= arg= args=
+ local IFS="$__IFS"
+
+ [ -z "${config}" ] && return 0
+
+ veinfo "Running ifconfig commands"
+ eindent
+ for conf in ${config}; do
+ unset IFS
+ args=
+ for arg in ${conf}; do
+ case ${arg} in
+ [Dd][Hh][Cc][Pp]) ;;
+ [Nn][Oo][Aa][Uu][Tt][Oo]) ;;
+ [Nn][Oo][Ss][Yy][Nn][Cc][Dd][Hh][Cc][Pp]) ;;
+ [Ss][Yy][Nn][Cc][Dd][Hh][Cc][Pp]) ;;
+ [Ww][Pp][Aa]) ;;
+ *) args="${args} ${arg}";;
+ esac
+ done
+
+ [ -z "${args}" ] && continue
+ vebegin "ifconfig${args}"
+ eval ifconfig "${IFACE}" "${args}"
+ veend $?
+ done
+ eoutdent
+
+ return 0
+}
+
# vim: set ts=4 :