From: Mike Frysinger Date: Thu, 22 Dec 2016 01:33:29 +0000 (-0500) Subject: gentoo-sync: restore flock call X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=f4853b9ebc5444e65b75de68cdf439d12bb55902;p=home.git gentoo-sync: restore flock call --- diff --git a/.bin/gentoo-sync b/.bin/gentoo-sync index ed2c071..5d78577 100755 --- a/.bin/gentoo-sync +++ b/.bin/gentoo-sync @@ -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=