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:
6ecb9a2
)
make nbd port check more robust
author
Wim Muskee
<wimmuskee@gmail.com>
Sat, 9 Feb 2013 11:54:20 +0000
(12:54 +0100)
committer
Harald Hoyer
<harald@redhat.com>
Mon, 11 Feb 2013 14:44:11 +0000
(15:44 +0100)
The following change makes the check for the nbd port or named export
more robust.
I wasn't sure whether to include sed in the dracut_install() of
module-setup.sh since net already does that (and nbd depends on that).
modules.d/95nbd/nbdroot.sh
patch
|
blob
|
history
diff --git
a/modules.d/95nbd/nbdroot.sh
b/modules.d/95nbd/nbdroot.sh
index
4d06425
..
b176a16
100755
(executable)
--- a/
modules.d/95nbd/nbdroot.sh
+++ b/
modules.d/95nbd/nbdroot.sh
@@
-31,7
+31,7
@@
nbdflags=${root%%:*}
nbdopts=${root#*:}
# If nbdport not an integer, then assume name based import
-if [
"${nbdport%[0-9]}" = "$nbdport"
]; then
+if [
! -z $(echo "$nbdport" | sed 's/[0-9]//g')
]; then
nbdport="-N $nbdport"
fi