Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Message-ID: <046e01c1c569$36331580$d700a8c0@mchasecompaq> From: "Michael A Chase" To: "Andrew DeFaria" , "cygwin" References: <17B78BDF120BD411B70100500422FC6309E4B7 AT IIS000> <20020306175108 DOT GA15442 AT redhat DOT com> <3C8668A2 DOT 4060103 AT DeFaria DOT com> <20020306192554 DOT GA17204 AT redhat DOT com> <019b01c1c547$5439d270$d700a8c0 AT mchasecompaq> <3C868E51 DOT 4000207 AT DeFaria DOT com> Subject: Re: Suggestion for setup Date: Wed, 6 Mar 2002 14:46:14 -0800 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 ----- Original Message ----- From: "Andrew DeFaria" Newsgroups: gmane.os.cygwin To: 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/