diff --git a/src/xx-apk b/src/xx-apk index 6f533b2..393ce84 100755 --- a/src/xx-apk +++ b/src/xx-apk @@ -3,11 +3,14 @@ set -e if [ -z "$XX_APK_NOLOCK" ]; then + # readlink -f in ash can not resolve symlinks from deep workdir + cd / if [ -L /var/lock ] && [ ! -e "$(readlink -f /var/lock)" ]; then mkdir -p "$(readlink -f /var/lock)" elif [ ! -d /var/lock ]; then mkdir -p /var/lock fi + cd - lock="/var/lock/xx-apk" exec 9>$lock flock -x 9