From 75297d6f202143f5b1528571ace8980c301044b4 Mon Sep 17 00:00:00 2001 From: Kairui Song Date: Wed, 21 Aug 2019 10:59:49 +0800 Subject: [PATCH] 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 Acked-by: Dave Young --- dracut-module-setup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dracut-module-setup.sh b/dracut-module-setup.sh index a995dfc..b186b38 100755 --- a/dracut-module-setup.sh +++ b/dracut-module-setup.sh @@ -264,7 +264,7 @@ kdump_setup_bond() { 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 }