diff options
author | antoine <antoine@FreeBSD.org> | 2016-11-01 08:33:36 +0800 |
---|---|---|
committer | antoine <antoine@FreeBSD.org> | 2016-11-01 08:33:36 +0800 |
commit | dc39cfdc28a2db2b1f88e9767210e076963580c9 (patch) | |
tree | d1947069a625ec9179704d9809ee147eee55ff53 | |
parent | ca7ddd5e76441532ff658c51237c85a8497dc02c (diff) | |
download | freebsd-ports-gnome-dc39cfdc28a2db2b1f88e9767210e076963580c9.tar.gz freebsd-ports-gnome-dc39cfdc28a2db2b1f88e9767210e076963580c9.tar.zst freebsd-ports-gnome-dc39cfdc28a2db2b1f88e9767210e076963580c9.zip |
Fix directory creation when primary group is different from user name
-rw-r--r-- | Mk/Scripts/do-users-groups.sh | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Mk/Scripts/do-users-groups.sh b/Mk/Scripts/do-users-groups.sh index c23ecf3fcf16..ad8ed1856a57 100644 --- a/Mk/Scripts/do-users-groups.sh +++ b/Mk/Scripts/do-users-groups.sh @@ -117,7 +117,8 @@ if [ -n "${USERS}" ]; then /|/nonexistent|/var/empty) ;; *) - echo "${dp_INSTALL} -d -g $login -o $login $homedir" >> "${dp_UG_INSTALL}" + group=$(awk -F: -v gid=${gid} '$3 == gid { print $1 }' ${dp_GID_FILES}) + echo "${dp_INSTALL} -d -g $group -o $login $homedir" >> "${dp_UG_INSTALL}" ;; esac done <<-eot |