Browse Source

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.
master
Wim Muskee 13 years ago committed by Harald Hoyer
parent
commit
b7b062ba79
  1. 5
      modules.d/95nbd/nbdroot.sh

5
modules.d/95nbd/nbdroot.sh

@ -30,6 +30,11 @@ nbdfstype=${root%%:*}; root=${root#*:} @@ -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

Loading…
Cancel
Save