From 2dd79784e87d3b3fd89d3c23f37e75f23cb94781 Mon Sep 17 00:00:00 2001 From: Paul Eggleton Date: Tue, 21 Apr 2015 14:01:55 +0100 Subject: mkefidisk.sh: fix hanging on non-writeable device If cleanup() is called early on, as happens when the device isn't writeable, then none of the mount point variables are set; thus the script was calling grep with only one argument and appeared to hang since it was waiting for input on stdin. (From OE-Core master rev: cf4a18eec2a65d840352d1a2862242d116e8a409) (From OE-Core rev: f8b8fbeee3f5c51f6b3e39200f935156be3936f3) Signed-off-by: Paul Eggleton Signed-off-by: Richard Purdie --- scripts/contrib/mkefidisk.sh | 3 +++ 1 file changed, 3 insertions(+) (limited to 'scripts') diff --git a/scripts/contrib/mkefidisk.sh b/scripts/contrib/mkefidisk.sh index 74cf40d..d6bc965 100755 --- a/scripts/contrib/mkefidisk.sh +++ b/scripts/contrib/mkefidisk.sh @@ -136,6 +136,9 @@ unmount_device() { } unmount() { + if [ "$1" = "" ] ; then + return 0 + fi grep -q $1 /proc/mounts if [ $? -eq 0 ]; then debug "Unmounting $1" -- cgit v1.1