delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/07/03/09:05:04

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Message-ID: <000b01c34163$b063bcc0$6fc82486@medschool.dundee.ac.uk>
Reply-To: <fergus AT bonhard DOT uklinux DOT net>
From: <fergus AT bonhard DOT uklinux DOT net>
To: <cygwin AT cygwin DOT com>
Cc: <fergus AT bonhard DOT uklinux DOT net>
Subject: Starting up : file seek order
Date: Thu, 3 Jul 2003 14:04:51 +0100
MIME-Version: 1.0
X-Priority: 3
X-MSMail-Priority: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165

Four questions with my guessed answers. Please would it be possible for
somebody who _knows_ the answers to respond? Then there's a 5th question, of
the right answer to which I haven't a clue. Thanks very much indeed.

Q1. When starting (a properly installed and mounted) Cygwin up using the
command c:\bin\bash --login -i <Enter> it seems that the file /etc/profile
is sought and run then the file ~/.bash_profile likewise. Yes? (This seems
to happen even when both files are empty, as evidenced by constructing them
as one-line files of the type "echo This file is called...".)

Q2. When starting Cygwin up using the command c:\bin\bash <Enter> it seems
that the file ~/.bashrc is sought and run. The file /etc/profile isn't. Yes?

Q3. Even if all 3 files exist but are empty, Cygwin (however it is started
up) "knows" what HOME is, and therefore I deduce it gets it from
/etc/passwd. So, at some stage prior to the searches described in QQ1 and 2,
/etc/passwd and /etc/group are sought. Yes?

Q4. If /etc/passwd does not exist, then $HOME is set by default to /. Yes?

My final question refers to a version of Cygwin run from a portable CD G: on
a Cygwin-free machine, and therefore I recognise that it might not get
(might not deserve) an answer. The system is mounted using the command
g:\bin\mount g:/ / and thereafter it is started using (either) g:\bin\bash
or g:\bin\bash --login -i. Apart from the differences described in Q1 and Q2
above either usage is thereafter indistinguishable (to me). The file
g:\etc\passwd contains one line

    entry1:entry2:500:544:entry3:/home/entry4:/bin/bash

and works fine on machines with W98(SE). But not on NT (although,
annoyingly, I have a memory that once it did).

Q5. Because when an attempt is made to run the CD version from NT machines
it turns out that HOME is set to /, and not to /home/entry4, I deduce
(possibly wrongly) that /etc/passwd as written above is either not being
read or is inadequate to define HOME. Yes?

I know that on NT and XP systems the command mkpasswd -l generates a file
much more than one line long. I could try to use that, which would
necessitate understanding it. Yuk. And run the risk of breaking the current
happy working-ness on W98 systems. I know I could, and should, try it. But
maybe something I've written will generate a quick and clear pointer to
what's tripping the NT mounted portable system up?

Thank you.

Fergus


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019