]> git.wh0rd.org - home.git/commitdiff
gentoo-sync: restore flock call
authorMike Frysinger <vapier@gentoo.org>
Thu, 22 Dec 2016 01:33:29 +0000 (20:33 -0500)
committerMike Frysinger <vapier@gentoo.org>
Thu, 22 Dec 2016 01:33:29 +0000 (20:33 -0500)
.bin/gentoo-sync

index ed2c071e77395908815c5f09aa7c1436daaa8460..5d78577726f953f5d0968b74193b4641a84e6ab6 100755 (executable)
@@ -11,7 +11,8 @@ conf="/etc/gentoo-sync.conf"
 [[ -e ${conf} ]] && . "${conf}"
 
 bootstrap() {
-       [[ $(id -u) -eq 0 ]] || exec sudo env -uUNSHARE HOME="$HOME" "$0" "$@"
+       [[ "${FLOCKER}" != "$0" ]] && exec env FLOCKER="$0" flock -en "$0" "$0" "$@"
+       [[ $(id -u) -eq 0 ]] || exec sudo env -uUNSHARE FLOCKER="${FLOCKER}" HOME="$HOME" "$0" "$@"
 
        if [[ -z ${UNSHARE} ]] ; then
                mount_args=