----- Original Message ----- From: "Andrew DeFaria" <[EMAIL PROTECTED]> Newsgroups: gmane.os.cygwin To: <[EMAIL PROTECTED]> Sent: Wednesday, March 06, 2002 13:46 Subject: Re: Suggestion for setup
> Michael A Chase wrote: > > > I recently messed with the function that does that, so I can confirm that it > > only runs mkpasswd and mkgroup if the corresponding files don't exist. > > When did this come about? Because every time I reinstall Cygwin it does > indeed run mkpasswd -l. I wonder, since our /etc/passwd is a symlink, > whether this function considers a symlink == file doesn't exist? The test has been in the code for quite a while, I tweaked the test so it wouldn't create /etc/postinstall/passwd-grp.bat unnecessarily, but even before that it shouldn't have called mkpasswd or mkgroup if /etc/passwd or /etc/group respectively already existed. Are the symlinks Cygwin or Windows style links? The test looks for the exact file name and may be sensitive to the extension added to some links in Windows. If you haven't already, try re-creating the symbolic links from the bash prompt. -- Mac :}) Give a hobbit a fish and he eats fish for a day. Give a hobbit a ring and he eats fish for an age. There is a macro in port.h that maps '_access' to 'access' which I think is the function defined in src/winsup/cygwin/syscalls.cc. In src/winsup/cinstall/desktop.cc: . . . static int uexists (const char *path) { String f = cygpath (path); int a = _access (f.cstr_oneuse(), 0); if (a == 0) return 1; return 0; } static void make_passwd_group () { String fname = cygpath ("/etc/postinstall/passwd-grp.bat"); io_stream::mkpath_p (PATH_TO_FILE, fname); if (uexists ("/etc/passwd") && uexists ("/etc/group")) return; . . . -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/