From 145b91b8f8c6b470a90e4e52e777e17076614da0 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Wed, 24 Aug 2016 12:02:19 +0200 Subject: scripts: mount-nv: support newer util-linux "mount" output message Right now the utility looks at mount's output, it used to search for "bad superblock" but the recent message is "can't read superblock". Unfortunately the error code 32 is very vague ("mount failure") and can't be used. So we're expanding the allowed messages in mount's output. --- scripts/mount-nv | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/mount-nv b/scripts/mount-nv index 867f915..753ee49 100755 --- a/scripts/mount-nv +++ b/scripts/mount-nv @@ -77,7 +77,7 @@ if mkdir -p $PERSIST_DIR 2>/dev/null; then retmsg=$(mount -t jffs2 $mtdblock $PERSIST_DIR 2>&1) ret="$?" if [ "$ret" != "0" ] ; then - retmsg=$( echo "$retmsg" | grep "bad superblock") + retmsg=$( echo "$retmsg" | grep "\(read\|bad\) superblock") if [ -n "$retmsg" ] ; then if [ "$1" = "--format" ] ; then tr '\000' '\377' /dev/null -- 1.7.12.1