diff options
-rwxr-xr-x | functions/lockfile.sh | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/functions/lockfile.sh b/functions/lockfile.sh index eda8d81..189d0c2 100755 --- a/functions/lockfile.sh +++ b/functions/lockfile.sh @@ -23,18 +23,15 @@ Check_lockfile () Create_lockfile () { - if [ "${LH_FORCE}" != "enabled" ] - then - FILE="${1}" - DIRECTORY="$(dirname ${1})" + FILE="${1}" + DIRECTORY="$(dirname ${1})" - # Creating lock directory - mkdir -p "${DIRECTORY}" + # Creating lock directory + mkdir -p "${DIRECTORY}" - # Creating lock trap - trap 'ret=${?}; '"rm -f \"${FILE}\"; "'for FILESYSTEM in devpts proc sysfs; do lh_chroot_${FILESYSTEM} remove --force; done; exit ${ret}' EXIT + # Creating lock trap + trap 'ret=${?}; '"rm -f \"${FILE}\";"' exit ${ret}' EXIT - # Creating lock file - touch "${FILE}" - fi + # Creating lock file + touch "${FILE}" } |