[Why] In dash, we must add double quotes when calling a method using `$()`. + local ycb= asf + echo ycb: : ycb: :
The lack of double quotes in our current code leads to a wrong judgement.
[Error Msg] + local net_devices= enp0s1 + [ -z ] + warn_no_eth0
Signed-off-by: Yu Chuan 13186087857@163.com --- lib/bootstrap.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/bootstrap.sh b/lib/bootstrap.sh index 94b94c28e9a8..30e4af828bcd 100755 --- a/lib/bootstrap.sh +++ b/lib/bootstrap.sh @@ -73,7 +73,7 @@ get_net_devices() net_devices_link() { local operation=$1 - local net_devices=$(get_net_devices) + local net_devices="$(get_net_devices)" local ndev for ndev in $net_devices do @@ -163,7 +163,7 @@ setup_network() $LKP_DEBUG_PREFIX $LKP_SRC/bin/run-ipconfig network_ok && return
- local net_devices=$(get_net_devices) + local net_devices="$(get_net_devices)" if [ -z "$net_devices" ]; then
warn_no_eth0