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>
This commit is contained in:
Karel Kočí 2020-03-09 14:59:29 +01:00 committed by Josef Schlehofer
parent 1186e6d427
commit 3e2995aff2
No known key found for this signature in database
GPG Key ID: B950216FE4329F4C
2 changed files with 4 additions and 2 deletions

View File

@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=btrfs-progs
PKG_VERSION:=5.4.1
PKG_RELEASE:=2
PKG_RELEASE:=3
PKG_SOURCE:=$(PKG_NAME)-v$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=@KERNEL/linux/kernel/people/kdave/btrfs-progs

View File

@ -1,7 +1,9 @@
#!/bin/sh
preinit_btrfs_scan() {
grep -vq btrfs /proc/filesystems || btrfs device scan
if grep -q btrfs /proc/filesystems; then
btrfs device scan
fi
}
boot_hook_add preinit_main preinit_btrfs_scan