aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2016-02-29 12:34:09 -0800
committerRobin H. Johnson <robbat2@gentoo.org>2016-02-29 12:34:16 -0800
commitc37d0daba2f264c72a945dcebd08e9a42d8649f7 (patch)
tree19db5a14f546ad295adf6c1c1df7ec2d55ac11a9 /gen_funcs.sh
parentkconfig: disable CONFIG_FB_NVIDIA per bug #574358; obsolete with Nouveau (diff)
downloadgenkernel-c37d0daba2f264c72a945dcebd08e9a42d8649f7.tar.gz
genkernel-c37d0daba2f264c72a945dcebd08e9a42d8649f7.tar.bz2
genkernel-c37d0daba2f264c72a945dcebd08e9a42d8649f7.zip
fix rootfs detection per bug #552052
ZFS and btrfs tools if not explictly configured (either way), default to detecting the fstype of the rootfs. The old rootfs detection method was NOT reliable in all cases; so replace it with a different way. Future improvements should check for rootfs AND the local existence of the required binaries (and bail out early if the the rootrfs was detected but the binaries are not present). Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
Diffstat (limited to 'gen_funcs.sh')
-rwxr-xr-xgen_funcs.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/gen_funcs.sh b/gen_funcs.sh
index 37942ad..eb807ad 100755
--- a/gen_funcs.sh
+++ b/gen_funcs.sh
@@ -498,7 +498,9 @@ set_config_with_override() {
rootfs_type_is() {
local fstype=$1
- if $(df -t ${fstype} / 2>/dev/null 1>/dev/null)
+ # It is possible that the awk will return MULTIPLE lines, depending on your
+ # initramfs setup (one of the entries will be 'rootfs').
+ if awk '($2=="/"){print $3}' /proc/mounts | grep -sq --line-regexp "$fstype" ;
then
echo yes
else