From: Mike Frysinger Date: Sun, 16 Feb 2014 11:05:35 +0000 (-0500) Subject: check $ID rather than writable root X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=deeffdc9fc974274bc442410ed908853ed732845;p=home.git check $ID rather than writable root --- diff --git a/.bin/custom-chroot b/.bin/custom-chroot index 42b0c5a..c6e3164 100755 --- a/.bin/custom-chroot +++ b/.bin/custom-chroot @@ -1,7 +1,7 @@ #!/bin/bash -e bootstrap() { - [[ -w / ]] || exec sudo env -uUNSHARE HOME="$HOME" "$0" "$@" + [[ $(id -u) -eq 0 ]] || exec sudo env -uUNSHARE HOME="$HOME" "$0" "$@" if [[ -z ${UNSHARE} ]] ; then mount_args=