From: Wim Muskee Date: Sat, 17 Mar 2012 11:33:55 +0000 (+0100) Subject: provide name based nbd connects X-Git-Tag: 018~41 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b7b062ba795521433ecd82fa4f214084d17f1ffa;p=platform%2Fupstream%2Fdracut.git provide name based nbd connects Because nbd-server also provides name-based exports instead of port-based ones, make it possible to connect to those. --- diff --git a/modules.d/95nbd/nbdroot.sh b/modules.d/95nbd/nbdroot.sh index e20b4e4..0e7dd9b 100755 --- a/modules.d/95nbd/nbdroot.sh +++ b/modules.d/95nbd/nbdroot.sh @@ -30,6 +30,11 @@ nbdfstype=${root%%:*}; root=${root#*:} nbdflags=${root%%:*} nbdopts=${root#*:} +# If nbdport not an integer, then assume name based import +if [[ $nbdport != [0-9]* ]]; then + nbdport="-N $nbdport" +fi + if [ "$nbdopts" = "$nbdflags" ]; then unset nbdopts fi