Date: Sat, 30 Jul 2011 16:02:55 +0400 From: Test Rat <ttsestt@gmail.com> To: Michel Talon <talon@lpthe.jussieu.fr> Cc: freebsd-ports@freebsd.org Subject: nscd vs. ports that add user/group (Was: Time to mark portupgrade deprecated?) Message-ID: <86ipqkht74.fsf_-_@gmail.com> In-Reply-To: <86zkjwhuyf.fsf@gmail.com> (Test Rat's message of "Sat, 30 Jul 2011 15:24:56 %2B0400") References: <20110730110312.GA75209@lpthe.jussieu.fr> <86zkjwhuyf.fsf@gmail.com>
index | next in thread | previous in thread | raw e-mail
Test Rat <ttsestt@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;
}
%%
home |
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?86ipqkht74.fsf_-_>
