Blame 0004-99base-don-t-require-fs-lib-to-detect-rootfstype.patch

Harald Hoyer c4a5a0
From e42b6f9e1504290f54be0074eb51a025c812e84f Mon Sep 17 00:00:00 2001
Harald Hoyer c4a5a0
From: =?UTF-8?q?Amadeusz=20=C5=BBo=C5=82nowski?= <aidecoe@aidecoe.name>
Harald Hoyer c4a5a0
Date: Fri, 29 Jun 2012 13:58:19 +0200
Harald Hoyer c4a5a0
Subject: [PATCH] 99base: don't require fs-lib to detect rootfstype
Harald Hoyer c4a5a0
Harald Hoyer c4a5a0
If fs-lib is not included, no rootfs autodetection is performed.
Harald Hoyer c4a5a0
---
Harald Hoyer c4a5a0
 modules.d/99base/mount-hook.sh |    4 +++-
Harald Hoyer c4a5a0
 1 file changed, 3 insertions(+), 1 deletion(-)
Harald Hoyer c4a5a0
Harald Hoyer c4a5a0
diff --git a/modules.d/99base/mount-hook.sh b/modules.d/99base/mount-hook.sh
Harald Hoyer c4a5a0
index dcf1415..db07866 100755
Harald Hoyer c4a5a0
--- a/modules.d/99base/mount-hook.sh
Harald Hoyer c4a5a0
+++ b/modules.d/99base/mount-hook.sh
Harald Hoyer c4a5a0
@@ -4,7 +4,9 @@
Harald Hoyer c4a5a0
 
Harald Hoyer c4a5a0
 PATH=/usr/sbin:/usr/bin:/sbin:/bin
Harald Hoyer c4a5a0
 type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh
Harald Hoyer c4a5a0
-type det_fs >/dev/null 2>&1 || . /lib/fs-lib.sh
Harald Hoyer c4a5a0
+type det_fs >/dev/null 2>&1 || [ -f /lib/fs-lib.sh ] && . /lib/fs-lib.sh
Harald Hoyer c4a5a0
+# If fs-lib is not included use following det_fs replacement.
Harald Hoyer c4a5a0
+type det_fs >/dev/null 2>&1 || det_fs() { echo "${2:-auto}"; }
Harald Hoyer c4a5a0
 
Harald Hoyer c4a5a0
 mountpoint="$1"
Harald Hoyer c4a5a0
 ismounted "$mountpoint" && exit 0