Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Date: Thu, 23 Sep 2004 14:36:15 -0400 (EDT)
From: Igor Pechtchanski <pechtcha@cs.nyu.edu>
Reply-To: cygwin@cygwin.com
To: Peter Rehley <peter@rehley.net>
cc: cygwin@cygwin.com
Subject: Re: special install
In-Reply-To: <1C8D2082-0D88-11D9-8A2B-000D932D0448@rehley.net>
Message-ID: <Pine.GSO.4.61.0409231423090.22306@slinky.cs.nyu.edu>
References: <NUTMEGbYiMCIqtQvAau0000007b@NUTMEG.CAM.ARTIMI.COM> <1C8D2082-0D88-11D9-8A2B-000D932D0448@rehley.net>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Scanned-By: MIMEDefang 2.39

On Thu, 23 Sep 2004, Peter Rehley wrote (heavily [snip]ped):

> On Sep 23, 2004, at 10:32 AM, Dave Korn wrote:
>
> > > From: cygwin-owner On Behalf Of J. David Boyd
> > >
> > > After you have a working installation on any computer, you can zip
> > > and copy the C:\CYGWIN directory.  It is totally self contained, and
> > > should work fine anywhere.
> >
> >   Nonsense!  That method won't create any mount points in the registry, nor
> > will it run any post-install scripts.
>
> Actually, what the person mention would work.  Only thing left out would
> be the registry settings.  If the user has a working copy then
> everything is already set up in the cygwin directory.  Copying this to
> another machine would be perfectly fine.  I know because I've done
> something like this before and it has worked for me.
>
> Potential problems could arise in
> 1) Registry settings.  These would need to be exported.

Gratuitous break here, just to emphasize the below.

> Actually, I think if
> they don't exist cygwin will create registry setting minus the mount points.
> The mount points would need to be adjusted or imported from the original.
> This could also be part of the zip file.

Here's the standard way:

mount -m | sed 's/^/c:\\cygwin\\bin\\/' > mounts.bat

then run mounts.bat on the new machine (assumes Cygwin is installed in
c:\cygwin\bin on both machines).

> 2) post-install scripts have already be run via initial setup.  However
> something would need to be done if any of the programs are set up as
> windows services.

Yes, that, and the links (if you move from a Win2k to a WinXP machine, the
/etc/{hosts,services,protocols,networks} symlinks *will* be broken).

> 3) passwd file.  If the same users exist on each machine, then this isn't an
> issue.

This is *wrong* (and is the main reason I'm sending this mesage,
actually).  WinNT/2k/XP machines have a notion of "SID" that they give to
each user.  That SID is different on different machines, even if the user
name is the same.  User SIDs are stored in /etc/passwd, so an /etc/passwd
from one machine will be useless on another.

> However domain users would need to be added.  This could be done
> before zipping cygwin directory.

Again, wrong.  Domain user SIDs are actually the same across the domain,
so the domain users in /etc/passwd will be ok.

Of course, one can re-run "(mkpasswd -l -c; mkpasswd -d) > /etc/passwd"
(among other fixup things), but the whole point was that you can't simply
move a Cygwin install without extra fixup actions.
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha@cs.nyu.edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor@watson.ibm.com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski, Ph.D.
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"Happiness lies in being privileged to work hard for long hours in doing
whatever you think is worth doing."  -- Dr. Jubal Harshaw

--
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/

