From 08412ca1e3788f1c1907ebae6d33d7014c74b048 Mon Sep 17 00:00:00 2001 From: "Robert \"ar\" Gerus" Date: Sun, 5 May 2013 19:56:17 +0200 Subject: [PATCH] The code is there. It should work... --- initramfs/init | 30 +++++++++++++++++++++--------- 1 file 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