Cc: Harald Hoyer <harald@redhat.com>
Signed-off-by: WANG Cong <xiyou.wangcong@gmail.com>
[[ -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
# 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
# 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!"