From df9bb6decd68c98b75996a586caab2ff0964a9da Mon Sep 17 00:00:00 2001 From: Michael Schroeder Date: Tue, 26 Jun 2012 14:18:55 +0200 Subject: [PATCH] - make stat report the numeric id so that we no longer get UNKNOWN --- init_buildsystem | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/init_buildsystem b/init_buildsystem index 118a61b..0c20b1d 100755 --- a/init_buildsystem +++ b/init_buildsystem @@ -103,7 +103,7 @@ PKGS=("$@") cleanup_and_exit() { trap EXIT - [ "$BUILD_ROOT" != / ] || chown $browner $BUILD_ROOT + test "$BUILD_ROOT" = / -a -n "$browner" && chown "$browner" "$BUILD_ROOT" # umount so init_buildsystem can be used standalone # XXX: use stat -f /dev/pts/ -c %T to check whether it's mounted and not suppress errors then? umount -n "$BUILD_ROOT/proc/sys/fs/binfmt_misc" 2> /dev/null || true @@ -578,7 +578,7 @@ set_build_arch trap fail_exit EXIT if [ "$BUILD_ROOT" = / ]; then - browner="$(stat -c %U /)" + browner="$(stat -c %u /)" fi if [ -n "$CLEAN_BUILD" ]; then -- 2.7.4