From a58de88b0cb6e1771870326ffcc229e8a2d83ab6 Mon Sep 17 00:00:00 2001 From: "Simon J. Gerraty" Date: Thu, 22 Nov 2012 04:50:42 +0000 Subject: [PATCH] INSTALL_AS_USER: output of id -un will never match 0 so use id -u and USER for BINOWN etc. Approved by: marcel (mentor) --- share/mk/bsd.own.mk | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/share/mk/bsd.own.mk b/share/mk/bsd.own.mk index f70eaccb448a..b4cdb6a14442 100644 --- a/share/mk/bsd.own.mk +++ b/share/mk/bsd.own.mk @@ -678,11 +678,14 @@ CTFCONVERT_CMD= @: .endif .if ${MK_INSTALL_AS_USER} != "no" -_uid!= id -un +_uid!= id -u .if ${_uid} != 0 +.if !defined(USER) +USER!= id -un +.endif _gid!= id -gn .for x in BIN CONF DOC INFO KMOD LIB MAN NLS SHARE -$xOWN= ${_uid} +$xOWN= ${USER} $xGRP= ${_gid} .endfor .endif