[PATCH] make nbd port check more robust

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.orig     2013-02-09 12:37:26.804648073 +0100
+++ modules.d/95nbd/nbdroot.sh  2013-02-09 12:41:55.522345127 +0100
@@ -31,7 +31,7 @@
 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

regards, Wim
--
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux