fix(nbd): shellcheck regression

`$opts`, `$preopts` and `$nbdport` shouldn't have been quoted as they
can expand to multiple options.

Fixes: https://github.com/dracutdevs/dracut/issues/1270
master
Harald Hoyer 2021-03-31 11:15:46 +02:00 committed by Harald Hoyer
parent bb69aff14d
commit 2d83bce21b
1 changed files with 4 additions and 2 deletions

View File

@ -129,8 +129,10 @@ else
nbdport="-name $nbdport"
fi

nbd-client -check /dev/nbd0 > /dev/null \
|| nbd-client "$nbdserver" "$nbdport" /dev/nbd0 "$preopts" "$opts" || exit 1
if ! nbd-client -check /dev/nbd0 > /dev/null; then
# shellcheck disable=SC2086
nbd-client "$nbdserver" $nbdport /dev/nbd0 $preopts $opts || exit 1
fi

# NBD doesn't emit uevents when it gets connected, so kick it
echo change > /sys/block/nbd0/uevent