projects
/
platform
/
upstream
/
dracut.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4e25cf6
)
provide name based nbd connects
author
Wim Muskee
<wimmuskee@gmail.com>
Sat, 17 Mar 2012 11:33:55 +0000
(12:33 +0100)
committer
Harald Hoyer
<harald@redhat.com>
Wed, 21 Mar 2012 12:06:49 +0000
(13:06 +0100)
Because nbd-server also provides name-based exports instead of
port-based ones, make it possible to connect to those.
modules.d/95nbd/nbdroot.sh
patch
|
blob
|
history
diff --git
a/modules.d/95nbd/nbdroot.sh
b/modules.d/95nbd/nbdroot.sh
index
e20b4e4
..
0e7dd9b
100755
(executable)
--- 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