[PATCH 2 of 3] Check if lock_dir is set before using it in an rm -rf

Wald Commits scm-commit at wald.intevation.org
Fri Aug 22 19:16:49 CEST 2014


# HG changeset patch
# User Andre Heinecke <andre.heinecke at intevation.de>
# Date 1408727731 -7200
# Node ID f6b52f60f64358b1aa0cf69ef56997a59249bc61
# Parent  53f704422fac9a9d8cd388a9c7e065dbe041539c
Check if lock_dir is set before using it in an rm -rf

diff -r 53f704422fac -r f6b52f60f643 packaging/linux-installer.inc.in
--- a/packaging/linux-installer.inc.in	Fri Aug 22 19:14:26 2014 +0200
+++ b/packaging/linux-installer.inc.in	Fri Aug 22 19:15:31 2014 +0200
@@ -180,6 +180,9 @@
   getxt "Cleaning up temporary stuff ...\n"
   # remove temporary directories,
   # $lock_dir is generate by the shar
+  if [ -z "${lock_dir-}" ]; then
+    exit
+  fi
   for dir in "${instcfg[PREFIX]}/$lock_dir" "$extra_bin_path" ; do
     [ -d "$dir" ] &&
         rm -rf "$dir"


More information about the Trustbridge-commits mailing list