From deeffdc9fc974274bc442410ed908853ed732845 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Sun, 16 Feb 2014 06:05:35 -0500 Subject: [PATCH] check $ID rather than writable root --- .bin/custom-chroot | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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= -- 2.39.5