dracut-module-setup: fix bond ifcfg processing
Bond options in ifcfg is space separated, dracut expected it to be comma separated, so it have to be parsed and converted during initramfs building. The currently parsing and convert pattern is flawed, for example: " downdelay=0 miimon=100 mode=802.3ad updelay=0 " is converted to : ":,downdelay=0 miimon=100 mode=802.3ad updelay=0 " should be: ":downdelay=0,miimon=100,mode=802.3ad,updelay=0" So fix this issue by using more simple but robust method for processing the options. Signed-off-by: Kairui Song <kasong@redhat.com> Acked-by: Dave Young <dyoung@redhat.com>
This commit is contained in:
parent
a5ea190af2
commit
75297d6f20
@ -264,7 +264,7 @@ kdump_setup_bond() {
|
|||||||
|
|
||||||
source_ifcfg_file $_netdev
|
source_ifcfg_file $_netdev
|
||||||
|
|
||||||
bondoptions="$(echo :$BONDING_OPTS | sed 's/\s\+/,/')"
|
bondoptions=":$(echo $BONDING_OPTS | xargs echo | tr " " ",")"
|
||||||
echo "$bondoptions" >> ${initdir}/etc/cmdline.d/42bond.conf
|
echo "$bondoptions" >> ${initdir}/etc/cmdline.d/42bond.conf
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user