diff options
author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2015-04-21 14:01:55 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-04-27 15:16:28 +0100 |
commit | cf4a18eec2a65d840352d1a2862242d116e8a409 (patch) | |
tree | 9777c4179eb0db190332cce46f0a5f7530fa0ef6 | |
parent | 8f6eb9a86ce64b4c534342fe315069eb4064de88 (diff) | |
download | openembedded-core-cf4a18eec2a65d840352d1a2862242d116e8a409.tar.gz openembedded-core-cf4a18eec2a65d840352d1a2862242d116e8a409.tar.bz2 openembedded-core-cf4a18eec2a65d840352d1a2862242d116e8a409.zip |
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.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rwxr-xr-x | scripts/contrib/mkefidisk.sh | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/scripts/contrib/mkefidisk.sh b/scripts/contrib/mkefidisk.sh index 74cf40d551..d6bc965137 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" |