nixos-container: avoid subshell when testing $PRIVATE_USERS (#383056)
This commit is contained in:
@@ -118,7 +118,7 @@ let
|
|||||||
NIX_BIND_OPT=""
|
NIX_BIND_OPT=""
|
||||||
if [ -n "$PRIVATE_USERS" ]; then
|
if [ -n "$PRIVATE_USERS" ]; then
|
||||||
extraFlags+=("--private-users=$PRIVATE_USERS")
|
extraFlags+=("--private-users=$PRIVATE_USERS")
|
||||||
if [ "$PRIVATE_USERS" = "pick" ] || ( [ "$PRIVATE_USERS" != "identity" ] && [ "$PRIVATE_USERS" -gt 0 ] ); then
|
if [ "$PRIVATE_USERS" = "pick" ] || { [ "$PRIVATE_USERS" != "identity" ] && [ "$PRIVATE_USERS" -gt 0 ]; }; then
|
||||||
# when user namespacing is enabled, we use `idmap` mount option
|
# when user namespacing is enabled, we use `idmap` mount option
|
||||||
# so that bind mounts under /nix get proper owner (and not nobody/nogroup).
|
# so that bind mounts under /nix get proper owner (and not nobody/nogroup).
|
||||||
NIX_BIND_OPT=":idmap"
|
NIX_BIND_OPT=":idmap"
|
||||||
|
|||||||
Reference in New Issue
Block a user