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-05-15 18:12:46 +0100 |
commit | 2dd79784e87d3b3fd89d3c23f37e75f23cb94781 (patch) | |
tree | ef5926f1874881509e6ce6634c62887457ddd199 | |
parent | e4ccc4dae3a9b4385161eaee2164cee474f0cfad (diff) | |
download | poky-2dd79784e87d3b3fd89d3c23f37e75f23cb94781.tar.gz |
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 <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() { | |||
136 | } | 136 | } |
137 | 137 | ||
138 | unmount() { | 138 | unmount() { |
139 | if [ "$1" = "" ] ; then | ||
140 | return 0 | ||
141 | fi | ||
139 | grep -q $1 /proc/mounts | 142 | grep -q $1 /proc/mounts |
140 | if [ $? -eq 0 ]; then | 143 | if [ $? -eq 0 ]; then |
141 | debug "Unmounting $1" | 144 | debug "Unmounting $1" |