# no point in trying to support it in the initramfs.
type -P btrfs >/dev/null || return 1
- . $dracutfunctions
- [[ $debug ]] && set -x
-
[[ $hostonly ]] || [[ $mount_needs ]] && {
local _found
for fs in ${host_fs_types[@]}; do
# if cryptsetup is not installed, then we cannot support encrypted devices.
type -P cryptsetup >/dev/null || return 1
- . $dracutfunctions
-
check_crypt() {
local dev=$1 fs=$2
[[ $fs = "crypto_LUKS" ]] || return 1
# in trying to support it in the initramfs.
type -P dmraid >/dev/null || return 1
- . $dracutfunctions
- [[ $debug ]] && set -x
-
check_dmraid() {
local dev=$1 fs=$2 holder DEVPATH DM_NAME
[[ "$fs" = "${fs%%_raid_member}" ]] && return 1
# No point trying to support lvm if the binaries are missing
type -P lvm >/dev/null || return 1
- . $dracutfunctions
- [[ $debug ]] && set -x
-
check_lvm() {
local DM_VG_NAME DM_LV_NAME DM_UDEV_DISABLE_DISK_RULES_FLAG
eval $(udevadm info --query=property --name=$1|egrep '(DM_VG_NAME|DM_LV_NAME|DM_UDEV_DISABLE_DISK_RULES_FLAG)=')
# No mdadm? No mdraid support.
type -P mdadm >/dev/null || return 1
- . $dracutfunctions
- [[ $debug ]] && set -x
-
check_mdraid() {
local dev=$1 fs=$2 holder DEVPATH MD_UUID
[[ "$fs" = "${fs%%_raid_member}" ]] && return 1
# if there's no multipath binary, no go.
type -P multipath >/dev/null || return 1
- . $dracutfunctions
- [[ $debug ]] && set -x
-
is_mpath() {
local _dev
_dev=$(get_maj_min $1)
# If hostonly was requested, fail the check if we are not actually
# booting from root.
- . $dracutfunctions
-
- [[ $debug ]] && set -x
-
is_iscsi() (
local _dev
_dev=$(get_maj_min $1)
# mounted on, fail the hostonly check.
[[ $hostonly ]] || [[ $mount_needs ]] && {
is_nbd() { [[ -b /dev/block/$1 && $1 == 43:* ]] ;}
- . $dracutfunctions
_rootdev=$(find_root_block_device)
[[ -b /dev/block/$_rootdev ]] || return 1