summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobert "ar" Gerus <ar@bash.org.pl>2013-05-05 19:56:17 +0200
committerRobert "ar" Gerus <ar@bash.org.pl>2013-05-05 19:56:17 +0200
commit08412ca1e3788f1c1907ebae6d33d7014c74b048 (patch)
tree030b979380e25ae487b3bad13ac3e9d636348eff
parente7f6fdc1ec570a791c7a0e43be1e4ed0746654fa (diff)
downloadtar-xz-loading-initramfs-08412ca1e3788f1c1907ebae6d33d7014c74b048.tar.gz
tar-xz-loading-initramfs-08412ca1e3788f1c1907ebae6d33d7014c74b048.tar.bz2
tar-xz-loading-initramfs-08412ca1e3788f1c1907ebae6d33d7014c74b048.zip
The code is there. It should work...
-rwxr-xr-xinitramfs/init30
1 files changed, 21 insertions, 9 deletions
diff --git a/initramfs/init b/initramfs/init
index c529a16..4ccbc4e 100755
--- a/initramfs/init
+++ b/initramfs/init
@@ -84,18 +84,30 @@ fi
info "checking for network configuration on kernel commandline"
echo ""
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
- # 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.
# Do it in a subshell to prevent IFS change leak.
- (
- IFS=","
- set -- ${var/*=}
- info "ip ${@}"
- /busybox ip ${@}
- isok $?
- )
+ ipcmd)
+ (
+ IFS=","
+ set -- ${var/*=}
+ info "ip ${@}"
+ /busybox ip ${@}
+ isok $?
+ )
+ ;;
+ brctl)
+ (
+ IFS=","
+ set -- ${var/*=}
+ info "brctl ${@}"
+ /busybox brctl ${@}
+ isok $?
+ )
+ ;;
fi
done