summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorBjørn Forsman <bjorn.forsman@gmail.com>2016-07-01 13:04:24 +0200
committerBjørn Forsman <bjorn.forsman@gmail.com>2016-07-01 13:13:46 +0200
commit6e528893a8ccaf3fa4ad23bc0e4d18c679c1f37d (patch)
treea6c5e9c0e9e3f41e9aa99d20d7c40a7e576f429b /nixos
parentb5e237bda66095eaa3c071ba58b1282ea4a45651 (diff)
downloadnixpkgs-6e528893a8ccaf3fa4ad23bc0e4d18c679c1f37d.tar
nixpkgs-6e528893a8ccaf3fa4ad23bc0e4d18c679c1f37d.tar.gz
nixpkgs-6e528893a8ccaf3fa4ad23bc0e4d18c679c1f37d.tar.bz2
nixpkgs-6e528893a8ccaf3fa4ad23bc0e4d18c679c1f37d.tar.lz
nixpkgs-6e528893a8ccaf3fa4ad23bc0e4d18c679c1f37d.tar.xz
nixpkgs-6e528893a8ccaf3fa4ad23bc0e4d18c679c1f37d.tar.zst
nixpkgs-6e528893a8ccaf3fa4ad23bc0e4d18c679c1f37d.zip
nixos/update-users-groups.pl: print UIDs and GIDs
Instead of showing this output from "nixos-rebuild switch":

  warning: not applying GID change of group ‘munin’
  warning: not applying UID change of user ‘ntp’

print this:

  warning: not applying GID change of group ‘munin’ (95 -> 102)
  warning: not applying UID change of user ‘ntp’ (3 -> 179)

This makes it possible for users to take action and fixup the UIDs/GIDs
that NixOS won't touch.
Diffstat (limited to 'nixos')
-rw-r--r--nixos/modules/config/update-users-groups.pl4
1 files changed, 2 insertions, 2 deletions
diff --git a/nixos/modules/config/update-users-groups.pl b/nixos/modules/config/update-users-groups.pl
index de73de91629..967f427374b 100644
--- a/nixos/modules/config/update-users-groups.pl
+++ b/nixos/modules/config/update-users-groups.pl
@@ -103,7 +103,7 @@ foreach my $g (@{$spec->{groups}}) {
     if (defined $existing) {
         $g->{gid} = $existing->{gid} if !defined $g->{gid};
         if ($g->{gid} != $existing->{gid}) {
-            warn "warning: not applying GID change of group ‘$name’\n";
+            warn "warning: not applying GID change of group ‘$name’ ($existing->{gid} -> $g->{gid})\n";
             $g->{gid} = $existing->{gid};
         }
         $g->{password} = $existing->{password}; # do we want this?
@@ -163,7 +163,7 @@ foreach my $u (@{$spec->{users}}) {
     if (defined $existing) {
         $u->{uid} = $existing->{uid} if !defined $u->{uid};
         if ($u->{uid} != $existing->{uid}) {
-            warn "warning: not applying UID change of user ‘$name’\n";
+            warn "warning: not applying UID change of user ‘$name’ ($existing->{uid} -> $u->{uid})\n";
             $u->{uid} = $existing->{uid};
         }
     } else {