mirror of
https://github.com/systemd/systemd
synced 2024-09-06 00:41:36 +00:00
test: split out host_has_{btrfs,mdadm}() from TEST-64-UDEV-STORAGE
This commit is contained in:
parent
997ba18af1
commit
5b4fa6f13c
|
@ -24,7 +24,7 @@ _host_has_feature() {(
|
|||
|
||||
case "${1:?}" in
|
||||
btrfs)
|
||||
modprobe -nv btrfs && command -v mkfs.btrfs && command -v btrfs || return $?
|
||||
host_has_btrfs
|
||||
;;
|
||||
iscsi)
|
||||
# Client/initiator (Open-iSCSI)
|
||||
|
@ -36,7 +36,7 @@ _host_has_feature() {(
|
|||
command -v lvm || return $?
|
||||
;;
|
||||
mdadm)
|
||||
command -v mdadm || return $?
|
||||
host_has_mdadm
|
||||
;;
|
||||
multipath)
|
||||
command -v multipath && command -v multipathd || return $?
|
||||
|
|
|
@ -1190,6 +1190,11 @@ install_lvm() {
|
|||
mkdir -p "${initdir:?}/etc/lvm"
|
||||
}
|
||||
|
||||
host_has_btrfs() (
|
||||
set -e
|
||||
modprobe -nv btrfs && command -v mkfs.btrfs && command -v btrfs || return $?
|
||||
)
|
||||
|
||||
install_btrfs() {
|
||||
instmods btrfs
|
||||
# Not all utilities provided by btrfs-progs are listed here; extend the list
|
||||
|
@ -1257,6 +1262,11 @@ install_iscsi() {
|
|||
fi
|
||||
}
|
||||
|
||||
host_has_mdadm() (
|
||||
set -e
|
||||
command -v mdadm || return $?
|
||||
)
|
||||
|
||||
install_mdadm() {
|
||||
local unit
|
||||
local mdadm_units=(
|
||||
|
|
Loading…
Reference in a new issue