The code is there. It should work...

master
Robert "ar" Gerus 2013-05-05 19:56:17 +02:00
parent e7f6fdc1ec
commit 08412ca1e3
1 changed files with 21 additions and 9 deletions

View File

@ -84,18 +84,30 @@ fi
info "checking for network configuration on kernel commandline" info "checking for network configuration on kernel commandline"
echo "" echo ""
for var in $(cat /proc/cmdline); do for var in $(cat /proc/cmdline); do
if [[ ${var/=*} = ipcmd ]]; then case "${var/=*}" in
# Split the "value" part of this parameter into parts, with "," as # Split the "value" part of this parameter into parts, with "," as
# separators and then use them for constructing iproute2 commandline. # separators and then use them for constructing iproute2 or brctl
# commandline.
# Don't do any input validation; escape to the shell if things break. # Don't do any input validation; escape to the shell if things break.
# Do it in a subshell to prevent IFS change leak. # Do it in a subshell to prevent IFS change leak.
( ipcmd)
IFS="," (
set -- ${var/*=} IFS=","
info "ip ${@}" set -- ${var/*=}
/busybox ip ${@} info "ip ${@}"
isok $? /busybox ip ${@}
) isok $?
)
;;
brctl)
(
IFS=","
set -- ${var/*=}
info "brctl ${@}"
/busybox brctl ${@}
isok $?
)
;;
fi fi
done done