summaryrefslogtreecommitdiff
path: root/modules.d
diff options
context:
space:
mode:
authorWim Muskee <wimmuskee@gmail.com>2012-03-17 12:33:55 +0100
committerHarald Hoyer <harald@redhat.com>2012-03-21 13:06:49 +0100
commitb7b062ba795521433ecd82fa4f214084d17f1ffa (patch)
treeb98df1ae43a5bc9e884e4a7ea65eacfdc4b5ba83 /modules.d
parent4e25cf6edf94755219a822ebc0e108e13377cc27 (diff)
downloaddracut-b7b062ba795521433ecd82fa4f214084d17f1ffa.tar.gz
dracut-b7b062ba795521433ecd82fa4f214084d17f1ffa.tar.bz2
dracut-b7b062ba795521433ecd82fa4f214084d17f1ffa.zip
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.
Diffstat (limited to 'modules.d')
-rwxr-xr-xmodules.d/95nbd/nbdroot.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/modules.d/95nbd/nbdroot.sh b/modules.d/95nbd/nbdroot.sh
index e20b4e45..0e7dd9bd 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