From: Wim Muskee Date: Sat, 9 Feb 2013 11:54:20 +0000 (+0100) Subject: make nbd port check more robust X-Git-Tag: 026~64 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c6a71c7b8a2fdfb4d946553dee2068ef484858c3;p=thirdparty%2Fdracut.git make nbd port check more robust The following change makes the check for the nbd port or named export more robust. I wasn't sure whether to include sed in the dracut_install() of module-setup.sh since net already does that (and nbd depends on that). --- diff --git a/modules.d/95nbd/nbdroot.sh b/modules.d/95nbd/nbdroot.sh index 4d06425c9..b176a1653 100755 --- a/modules.d/95nbd/nbdroot.sh +++ b/modules.d/95nbd/nbdroot.sh @@ -31,7 +31,7 @@ nbdflags=${root%%:*} nbdopts=${root#*:} # If nbdport not an integer, then assume name based import -if [ "${nbdport%[0-9]}" = "$nbdport" ]; then +if [ ! -z $(echo "$nbdport" | sed 's/[0-9]//g') ]; then nbdport="-N $nbdport" fi