diff options
-rwxr-xr-x | mbuto | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -1210,7 +1210,14 @@ usage() { # If we're not running as root, re-run with fakeroot -if [ "${LD_PRELOAD}" != "libfakeroot-sysv.so" ] && [ "$(id -u)" -ne 0 ]; then +if [ "$(id -u)" -eq 0 ] && \ + [ "$(cat /proc/self/uid_map)" = " 0 0 4294967295" ]; then + __as_root=1 +else + __as_root=0 +fi + +if [ "${LD_PRELOAD}" != "libfakeroot-sysv.so" ] && [ ${__as_root} -eq 0 ]; then if ! FAKEROOT="$(command -v fakeroot)"; then __fakeroot_missing="y" else |