|
Harald Hoyer |
8e216f |
From 7f347723d88ffe8a942bbc445a00defa3f06f4e5 Mon Sep 17 00:00:00 2001
|
|
Harald Hoyer |
8e216f |
From: Cong Wang <xiyou.wangcong@gmail.com>
|
|
Harald Hoyer |
8e216f |
Date: Wed, 25 Jan 2012 09:04:17 +0800
|
|
Harald Hoyer |
8e216f |
Subject: [PATCH] let some modules to respect $mount_needs
|
|
Harald Hoyer |
8e216f |
|
|
Harald Hoyer |
8e216f |
Cc: Harald Hoyer <harald@redhat.com>
|
|
Harald Hoyer |
8e216f |
Signed-off-by: WANG Cong <xiyou.wangcong@gmail.com>
|
|
Harald Hoyer |
8e216f |
---
|
|
Harald Hoyer |
8e216f |
modules.d/95iscsi/module-setup.sh | 2 +-
|
|
Harald Hoyer |
8e216f |
modules.d/95nbd/module-setup.sh | 2 +-
|
|
Harald Hoyer |
8e216f |
modules.d/95ssh-client/module-setup.sh | 1 +
|
|
Harald Hoyer |
8e216f |
3 files changed, 3 insertions(+), 2 deletions(-)
|
|
Harald Hoyer |
8e216f |
|
|
Harald Hoyer |
8e216f |
diff --git a/modules.d/95iscsi/module-setup.sh b/modules.d/95iscsi/module-setup.sh
|
|
Harald Hoyer |
8e216f |
index 5738941..d645dba 100755
|
|
Harald Hoyer |
8e216f |
--- a/modules.d/95iscsi/module-setup.sh
|
|
Harald Hoyer |
8e216f |
+++ b/modules.d/95iscsi/module-setup.sh
|
|
Harald Hoyer |
8e216f |
@@ -23,7 +23,7 @@ check() {
|
|
Harald Hoyer |
8e216f |
[[ -d iscsi_session ]]
|
|
Harald Hoyer |
8e216f |
)
|
|
Harald Hoyer |
8e216f |
|
|
Harald Hoyer |
8e216f |
- [[ $hostonly ]] && {
|
|
Harald Hoyer |
8e216f |
+ [[ $hostonly ]] || [[ $mount_needs ]] && {
|
|
Harald Hoyer |
8e216f |
_rootdev=$(find_root_block_device)
|
|
Harald Hoyer |
8e216f |
if [[ $_rootdev ]]; then
|
|
Harald Hoyer |
8e216f |
# root lives on a block device, so we can be more precise about
|
|
Harald Hoyer |
8e216f |
diff --git a/modules.d/95nbd/module-setup.sh b/modules.d/95nbd/module-setup.sh
|
|
Harald Hoyer |
8e216f |
index 793687d..a6f812f 100755
|
|
Harald Hoyer |
8e216f |
--- a/modules.d/95nbd/module-setup.sh
|
|
Harald Hoyer |
8e216f |
+++ b/modules.d/95nbd/module-setup.sh
|
|
Harald Hoyer |
8e216f |
@@ -9,7 +9,7 @@ check() {
|
|
Harald Hoyer |
8e216f |
|
|
Harald Hoyer |
8e216f |
# if an nbd device is not somewhere in the chain of devices root is
|
|
Harald Hoyer |
8e216f |
# mounted on, fail the hostonly check.
|
|
Harald Hoyer |
8e216f |
- [[ $hostonly ]] && {
|
|
Harald Hoyer |
8e216f |
+ [[ $hostonly ]] || [[ $mount_needs ]] && {
|
|
Harald Hoyer |
8e216f |
is_nbd() { [[ -b /dev/block/$1 && $1 == 43:* ]] ;}
|
|
Harald Hoyer |
8e216f |
. $dracutfunctions
|
|
Harald Hoyer |
8e216f |
|
|
Harald Hoyer |
8e216f |
diff --git a/modules.d/95ssh-client/module-setup.sh b/modules.d/95ssh-client/module-setup.sh
|
|
Harald Hoyer |
8e216f |
index 0ffc298..3b84900 100644
|
|
Harald Hoyer |
8e216f |
--- a/modules.d/95ssh-client/module-setup.sh
|
|
Harald Hoyer |
8e216f |
+++ b/modules.d/95ssh-client/module-setup.sh
|
|
Harald Hoyer |
8e216f |
@@ -8,6 +8,7 @@ check() {
|
|
Harald Hoyer |
8e216f |
# If our prerequisites are not met, fail.
|
|
Harald Hoyer |
8e216f |
type -P ssh >/dev/null || return 1
|
|
Harald Hoyer |
8e216f |
type -P scp >/dev/null || return 1
|
|
Harald Hoyer |
8e216f |
+ [[ $mount_needs ]] && return 1
|
|
Harald Hoyer |
8e216f |
if [[ $sshkey ]]; then
|
|
Harald Hoyer |
8e216f |
[ ! -f $sshkey ] && {
|
|
Harald Hoyer |
8e216f |
derror "sshkey is not found!"
|