[PATCH] let some modules to respect $mount_needs

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

 



Cc: Harald Hoyer <harald@xxxxxxxxxx>
Signed-off-by: WANG Cong <xiyou.wangcong@xxxxxxxxx>

---
 modules.d/95iscsi/module-setup.sh      |    2 +-
 modules.d/95nbd/module-setup.sh        |    2 +-
 modules.d/95ssh-client/module-setup.sh |    1 +
 3 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/modules.d/95iscsi/module-setup.sh b/modules.d/95iscsi/module-setup.sh
index 5738941..d645dba 100755
--- a/modules.d/95iscsi/module-setup.sh
+++ b/modules.d/95iscsi/module-setup.sh
@@ -23,7 +23,7 @@ check() {
         [[ -d iscsi_session ]]
     )
 
-    [[ $hostonly ]] && {
+    [[ $hostonly ]] || [[ $mount_needs ]] && {
         _rootdev=$(find_root_block_device)
         if [[ $_rootdev ]]; then
             # root lives on a block device, so we can be more precise about
diff --git a/modules.d/95nbd/module-setup.sh b/modules.d/95nbd/module-setup.sh
index 793687d..a6f812f 100755
--- a/modules.d/95nbd/module-setup.sh
+++ b/modules.d/95nbd/module-setup.sh
@@ -9,7 +9,7 @@ check() {
 
     # if an nbd device is not somewhere in the chain of devices root is
     # mounted on, fail the hostonly check.
-    [[ $hostonly ]] && {
+    [[ $hostonly ]] || [[ $mount_needs ]] && {
         is_nbd() { [[ -b /dev/block/$1 && $1 == 43:* ]] ;}
         . $dracutfunctions
 
diff --git a/modules.d/95ssh-client/module-setup.sh b/modules.d/95ssh-client/module-setup.sh
index 0ffc298..3b84900 100644
--- a/modules.d/95ssh-client/module-setup.sh
+++ b/modules.d/95ssh-client/module-setup.sh
@@ -8,6 +8,7 @@ check() {
     # If our prerequisites are not met, fail.
     type -P ssh >/dev/null || return 1
     type -P scp >/dev/null || return 1
+    [[ $mount_needs ]] && return 1
     if [[ $sshkey ]]; then
         [ ! -f $sshkey ] && {
             derror "sshkey is not found!"
-- 
1.7.7.5

--
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