From 4767c7fe609c8e43ece8f369cf9a4ba29d7253fc Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Tue, 30 May 2017 14:25:28 +0200 Subject: also accept if desired group is only supplemental --- hel/recv-media.nix | 4 ++-- 1 file 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" '' $(echo ''${2}) EOF - if [[ $(id -gn) != $group ]]; then - printf "Primary group is %s, trying to switch to %s..." $(id -gn) $group + if [[ $(id -Gn) != *"$group"* ]]; then + printf "Groups are ā€˜%sā€™. Trying to switch primary group to ā€˜%sā€™..." $(id -Gn) $group exec -- sg $group "$0 $*" fi -- cgit v1.2.3