diff options
author | Bryan Drewery <bryan@shatow.net> | 2015-03-06 20:19:54 +0300 |
---|---|---|
committer | Bryan Drewery <bryan@shatow.net> | 2015-03-06 20:19:54 +0300 |
commit | 849755f5e00070b8973e337739bf64c21785fd21 (patch) | |
tree | 3b1c12d10bed66bac6f3b89ec35ee1bc587345eb | |
parent | c0cc847e37c22ae7a196eb9ecd02e05082758202 (diff) |
Add a check to see if id(1) works in the jail.
This avoids an obscure error about not being able to create group
nobody when it already exists. It can happen when the ABI or emulation
for the jail is incorrectly setup.
-rwxr-xr-x | src/share/poudriere/common.sh | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/share/poudriere/common.sh b/src/share/poudriere/common.sh index ea626b83..f2b09e67 100755 --- a/src/share/poudriere/common.sh +++ b/src/share/poudriere/common.sh @@ -274,6 +274,8 @@ jstart() { ${ipargs} \ allow.socket_af allow.raw_sockets allow.chflags allow.sysvipc jexecd -j ${name}-n -d ${MASTERMNT}/../ ${MAX_MEMORY_BYTES+-m ${MAX_MEMORY_BYTES}} + injail id >/dev/null 2>&1 || \ + err 1 "Unable to execute id(1) in jail. Emulation or ABI wrong." if ! injail id ${PORTBUILD_USER} >/dev/null 2>&1 ; then msg_n "Creating user/group ${PORTBUILD_USER}" injail pw groupadd ${PORTBUILD_USER} -g 65532 || \ |