From ee49f21a83ff8ed563058a82e759d4314c3b47db Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Fri, 31 Oct 2014 12:03:43 +0100 Subject: mk-flash-layout: also report an error when -k is passed with no block device If we cannot find a block device and the caller passes -k, report an error as we cannot leave $FLASHDIR in a mounted state. --- scripts/mk-flash-layout | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/mk-flash-layout b/scripts/mk-flash-layout index 56a03b2..46d50b6 100644 --- a/scripts/mk-flash-layout +++ b/scripts/mk-flash-layout @@ -345,6 +345,9 @@ dump_layout() { fi fi fi + elif [ -n "$KEEP_MOUNTED" ]; then + [ -z "$QUIET" ] && echo "Found no flash block device to mount" + ret=1 fi if [ -n "$VERBOSE" ]; then -- 1.7.12.1