init: Suppress fsck command not present error by file system type
Decide lack of fsck is not a problem by the type of the rwfs image
instead of the full name of the fsck command. This eliminates
duplicates knowledge of how the fsck path is formed.
Suggested-by: Andrew Jeffery <andrew@aj.id.au>
Signed-off-by: Milton Miller <miltonm@us.ibm.com>
diff --git a/meta-phosphor/common/recipes-phosphor/obmc-phosphor-initfs/files/obmc-init.sh b/meta-phosphor/common/recipes-phosphor/obmc-phosphor-initfs/files/obmc-init.sh
index 538299e..d4d2cc1 100644
--- a/meta-phosphor/common/recipes-phosphor/obmc-phosphor-initfs/files/obmc-init.sh
+++ b/meta-phosphor/common/recipes-phosphor/obmc-phosphor-initfs/files/obmc-init.sh
@@ -183,7 +183,7 @@
then
debug_takeover "fsck of read-write fs on $rwdev failed (rc=$rc)"
fi
-elif test $fsck != /sbin/fsck.jffs2
+elif test "$rwfst" != jffs2
then
echo "No '$fsck' in read only fs, skipping fsck."
fi