mirror of
https://github.com/LnL7/nix-darwin.git
synced 2024-12-14 11:57:34 +00:00
users: add test for group membership
This commit is contained in:
parent
b1645201f1
commit
ca420b2f9e
1 changed files with 5 additions and 0 deletions
|
@ -4,6 +4,7 @@
|
|||
users.knownGroups = [ "foo" "created.group" "deleted.group" ];
|
||||
users.groups.foo.gid = 42000;
|
||||
users.groups.foo.description = "Foo group";
|
||||
users.groups.foo.members = [ "admin" "foo" ];
|
||||
|
||||
users.groups."created.group".gid = 42001;
|
||||
users.groups."unknown.group".gid = 42002;
|
||||
|
@ -30,6 +31,10 @@
|
|||
grep "dscl . -delete '/Groups/deleted.group'" ${config.out}/activate
|
||||
grep -qv "dscl . -create '/Groups/deleted.group'" ${config.out}/activate
|
||||
|
||||
echo "checking group membership in /activate" >&2
|
||||
grep "dscl . -create '/Groups/foo' GroupMembership 'admin' 'foo'" ${config.out}/activate
|
||||
grep "dscl . -create '/Groups/created.group' GroupMembership" ${config.out}/activate
|
||||
|
||||
echo "checking unknown group in /activate" >&2
|
||||
grep -qv "dscl . -create '/Groups/unknown.group'" ${config.out}/activate
|
||||
grep -qv "dscl . -delete '/Groups/unknown.group'" ${config.out}/activate
|
||||
|
|
Loading…
Reference in a new issue