packages/utils/btrfs-progs/files/btrfs-scan.init
Karel Kočí 3e2995aff2
btrfs-progs: fix check for btrfs in btrfs scan
The previous implementation always succeeded so no scan was performed.
This now fixes that and it correctly scans for BTRFS  devices if BTRFS
support is in kernel.

Signed-off-by: Karel Kočí <karel.koci@nic.cz>
2020-03-09 15:19:36 +01:00

9 lines
150 B
Bash

#!/bin/sh
preinit_btrfs_scan() {
if grep -q btrfs /proc/filesystems; then
btrfs device scan
fi
}
boot_hook_add preinit_main preinit_btrfs_scan