summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornl6720 <nl6720@gmail.com>2023-10-31 13:32:53 +0200
committernl6720 <nl6720@gmail.com>2023-11-04 16:38:22 +0200
commit77452bed037482307574e9dec931fbc2fe16365f (patch)
tree75bac3ca0becce550bdfc2e306fb281ed28fc18c
parent938741d8da5180023ef4f0256954243b262a654b (diff)
install/filesystems: include external mount helpers
Some file systems may need `mount.FSTYPE` binaries to properly mount. See https://man.archlinux.org/man/mount.8.en#EXTERNAL_HELPERS
-rw-r--r--install/filesystems21
1 files changed, 21 insertions, 0 deletions
diff --git a/install/filesystems b/install/filesystems
index 3e9dcff..d432e80 100644
--- a/install/filesystems
+++ b/install/filesystems
@@ -2,6 +2,8 @@
# SPDX-License-Identifier: GPL-2.0-only
build() {
+ local mount
+
# fs_autodetect_failed is assigned in the autodetect hook
# shellcheck disable=SC2154
if (( fs_autodetect_failed )); then
@@ -9,6 +11,25 @@ build() {
else
add_checked_modules -f 'nls' '/kernel/fs'
fi
+
+ # Some file systems may need `mount.FSTYPE` binaries to properly mount.
+ # See https://man.archlinux.org/man/mount.8.en#EXTERNAL_HELPERS
+ # fs_autodetect_failed is assigned in the autodetect hook
+ # shellcheck disable=SC2154
+ if (( ! fs_autodetect_failed )) && [[ -n "${rootfstype}${usrfstype}" ]]; then
+ if command -v "mount.${rootfstype}" &>/dev/null; then
+ add_binary "mount.${rootfstype}"
+ fi
+ if [[ -n "$usrfstype" && "$usrfstype" != "$rootfstype" ]]; then
+ if command -v "mount.${usrfstype}" &>/dev/null; then
+ add_binary "mount.${usrfstype}"
+ fi
+ fi
+ else
+ for mount in $(compgen -c mount.); do
+ add_binary "$mount"
+ done
+ fi
}
help() {