diff options
author | Gregor Kleen <gkleen@yggdrasil.li> | 2017-05-30 14:25:28 +0200 |
---|---|---|
committer | Gregor Kleen <gkleen@yggdrasil.li> | 2017-05-30 14:25:28 +0200 |
commit | 4767c7fe609c8e43ece8f369cf9a4ba29d7253fc (patch) | |
tree | 66f3f4e339028a4d384d4ef573429125df08da2a | |
parent | 54029fae7a31fe4fdc31fa149e8786cb2db1d411 (diff) | |
download | nixos-4767c7fe609c8e43ece8f369cf9a4ba29d7253fc.tar nixos-4767c7fe609c8e43ece8f369cf9a4ba29d7253fc.tar.gz nixos-4767c7fe609c8e43ece8f369cf9a4ba29d7253fc.tar.bz2 nixos-4767c7fe609c8e43ece8f369cf9a4ba29d7253fc.tar.xz nixos-4767c7fe609c8e43ece8f369cf9a4ba29d7253fc.zip |
also accept if desired group is only supplemental
-rw-r--r-- | hel/recv-media.nix | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/hel/recv-media.nix b/hel/recv-media.nix index 78d78121..23c2c89e 100644 --- a/hel/recv-media.nix +++ b/hel/recv-media.nix | |||
@@ -37,8 +37,8 @@ writeScriptBin "recv-media" '' | |||
37 | $(echo ''${2}) | 37 | $(echo ''${2}) |
38 | EOF | 38 | EOF |
39 | 39 | ||
40 | if [[ $(id -gn) != $group ]]; then | 40 | if [[ $(id -Gn) != *"$group"* ]]; then |
41 | printf "Primary group is %s, trying to switch to %s..." $(id -gn) $group | 41 | printf "Groups are ‘%s’. Trying to switch primary group to ‘%s’..." $(id -Gn) $group |
42 | exec -- sg $group "$0 $*" | 42 | exec -- sg $group "$0 $*" |
43 | fi | 43 | fi |
44 | 44 | ||