aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2016-04-05 09:20:52 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2016-04-05 09:20:52 +0000
commit2218e13cd66e5142352e91eb47b792e8d24d74cf (patch)
treee5cec84aa706cad31d2cba7ca02dee39c28df4c5
parent026d3b539e959b399424bdd51564aea1f5911e2f (diff)
downloadalpine-conf-2218e13cd66e5142352e91eb47b792e8d24d74cf.tar.bz2
alpine-conf-2218e13cd66e5142352e91eb47b792e8d24d74cf.tar.xz
setup-disk: only load filesystem module if needed
The filesystem may be compiled into the kernel
-rw-r--r--setup-disk.in4
1 files changed, 3 insertions, 1 deletions
diff --git a/setup-disk.in b/setup-disk.in
index ea3c590..1cfb8e6 100644
--- a/setup-disk.in
+++ b/setup-disk.in
@@ -448,7 +448,9 @@ init_progs() {
for fs in $BOOTFS $ROOTFS $VARFS; do
# we need load btrfs module early to avoid the error message:
# 'failed to open /dev/btrfs-control'
- modprobe $fs
+ if ! grep -q -w "$fs" /proc/filesystems; then
+ modprobe $fs
+ fi
case $fs in
xfs) fstools="$fstools xfsprogs";;