nscd vs. ports that add user/group (Was: Time to mark portupgrade
deprecated?)
Test Rat
ttsestt at gmail.com
Sat Jul 30 12:03:02 UTC 2011
Test Rat <ttsestt at gmail.com> writes:
>> As a testimonial to the diabolical nature of FreeBSD yesterday i have
>> installed a PC with FreeBSD-8.2 RELEASE, using the distributed packages
>> (pkg_add -r). When installing gimp, something went south. After some
>> checks it was avahi-app which refused to install, the reason being
>> that pw groupadd -n avahi failed, with the message:
>> "group disappeared during update"
> [...]
>
> Did you have nscd(8) running at the time? Try invalidating its cache.
Nevermind previous patch. This one actually works.
%% it's still an ugly hack
Index: usr.sbin/pw/pwupd.c
===================================================================
--- usr.sbin/pw/pwupd.c (revision 224499)
+++ usr.sbin/pw/pwupd.c (working copy)
@@ -191,6 +191,7 @@ pw_update(struct passwd * pwd, char const * user,
}
}
}
+ system("nscd -I passwd 2>/dev/null >&2");
return rc;
}
Index: usr.sbin/pw/grupd.c
===================================================================
--- usr.sbin/pw/grupd.c (revision 224499)
+++ usr.sbin/pw/grupd.c (working copy)
@@ -148,6 +148,7 @@ gr_update(struct group * grp, char const * group,
}
if (grbuf != NULL)
free(grbuf);
+ system("nscd -I group 2>/dev/null >&2");
return l;
}
%%
More information about the freebsd-ports
mailing list