mirror of
https://github.com/kiddin9/op-packages.git
synced 2026-08-01 15:09:33 +08:00
26 lines
492 B
Plaintext
26 lines
492 B
Plaintext
if /etc/init.d/mergerfs enabled && [ -f /etc/config/mergerfs ]; then
|
|
(
|
|
. /lib/functions.sh
|
|
|
|
add_paths() {
|
|
local section="$1"
|
|
local enabled paths
|
|
|
|
config_get_bool enabled "$section" enabled 0
|
|
[ "$enabled" -eq 1 ] || return 0
|
|
|
|
config_get paths "$section" paths
|
|
|
|
# (
|
|
printf "%s\n" "$paths" | while IFS= read -r p; do
|
|
case "$p" in
|
|
/*) fstab_add_essential_mountpoint "$p"
|
|
;;
|
|
esac
|
|
done
|
|
}
|
|
config_load mergerfs
|
|
config_foreach add_paths pool
|
|
)
|
|
fi
|