diff options
author | Wim Muskee <wimmuskee@gmail.com> | 2012-03-17 12:33:55 +0100 |
---|---|---|
committer | Harald Hoyer <harald@redhat.com> | 2012-03-21 13:06:49 +0100 |
commit | b7b062ba795521433ecd82fa4f214084d17f1ffa (patch) | |
tree | b98df1ae43a5bc9e884e4a7ea65eacfdc4b5ba83 /modules.d | |
parent | 4e25cf6edf94755219a822ebc0e108e13377cc27 (diff) | |
download | dracut-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-x | modules.d/95nbd/nbdroot.sh | 5 |
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 |