]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
99base: don't require fs-lib to detect rootfstype
authorAmadeusz Żołnowski <aidecoe@aidecoe.name>
Fri, 29 Jun 2012 11:58:19 +0000 (13:58 +0200)
committerHarald Hoyer <harald@redhat.com>
Mon, 2 Jul 2012 16:52:49 +0000 (18:52 +0200)
If fs-lib is not included, no rootfs autodetection is performed.

modules.d/99base/mount-hook.sh

index dcf14153cae27b1d544d1bb833f1835d301d2e9a..db0786683693f1f6f4b624216551fd02e79ae6d3 100755 (executable)
@@ -4,7 +4,9 @@
 
 PATH=/usr/sbin:/usr/bin:/sbin:/bin
 type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh
-type det_fs >/dev/null 2>&1 || . /lib/fs-lib.sh
+type det_fs >/dev/null 2>&1 || [ -f /lib/fs-lib.sh ] && . /lib/fs-lib.sh
+# If fs-lib is not included use following det_fs replacement.
+type det_fs >/dev/null 2>&1 || det_fs() { echo "${2:-auto}"; }
 
 mountpoint="$1"
 ismounted "$mountpoint" && exit 0