Well, lockfile is probably not what we want, but let's keep its use and

work-around its behavior: chmod u+x the created file.
This commit is contained in:
Laurent Rineau 2010-06-21 20:15:35 +00:00
parent 1a2118098b
commit 0b4c4cf211
1 changed files with 3 additions and 1 deletions

View File

@ -880,8 +880,10 @@ if [ ${?} != 0 ]; then
fi fi
fi fi
fi fi
# Make that file writable (lockfile create read-only files
chmod u+x "$LOCK_FILE"
# Put the PID of current process in the lock file # Put the PID of current process in the lock file
echo $$ >> "$LOCK_FILE" echo $$ > "$LOCK_FILE"
# that line makes the script remove the lock file in case of unwanted exit # that line makes the script remove the lock file in case of unwanted exit
trap "rm -f $LOCK_FILE" EXIT HUP INT TERM trap "rm -f $LOCK_FILE" EXIT HUP INT TERM