Add an if condition to check if the log directory exists. Create
one if it doesn't already exist.

Signed-off-by: Lisa Nguyen <lisa.ngu...@linaro.org>
---
 include/suspend_functions.sh |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/include/suspend_functions.sh b/include/suspend_functions.sh
index 5157143..49e1c01 100644
--- a/include/suspend_functions.sh
+++ b/include/suspend_functions.sh
@@ -52,7 +52,9 @@ if [ $? -ne 0 ]; then
 fi
 
 # Ensure the log directory exists.
-mkdir -p "$LOGDIR"
+if [ ! -d "$LOGDIR" ]; then
+    mkdir -p "$LOGDIR"
+fi
 
 setup_wakeup_timer ()
 {
-- 
1.7.9.5


_______________________________________________
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev

Reply via email to