mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-03-13 12:58:20 +03:00
test: split out host_has_{btrfs,mdadm}() from TEST-64-UDEV-STORAGE
(cherry picked from commit 5b4fa6f13cf860afa53c71b52e4ceca25f8f13a5) (cherry picked from commit a40677469af941118a2d86a386cc7a7ad8ff17ca) (cherry picked from commit a5ebe751c78cf7fc8af5060b981555adaa5ff34d) (cherry picked from commit b17e7fca359a04f5d589944e507bda70dd147339)
This commit is contained in:
parent
13aba264c5
commit
5ca6e6b81a
@ -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 $?
|
||||
|
@ -1110,6 +1110,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
|
||||
@ -1177,6 +1182,11 @@ install_iscsi() {
|
||||
fi
|
||||
}
|
||||
|
||||
host_has_mdadm() (
|
||||
set -e
|
||||
command -v mdadm || return $?
|
||||
)
|
||||
|
||||
install_mdadm() {
|
||||
local unit
|
||||
local mdadm_units=(
|
||||
|
Loading…
x
Reference in New Issue
Block a user