This is the mail archive of the cygwin-apps mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: Unattended installation of the entire Cygwin build


On 11 April 2007 18:57, Sarah Thompson wrote:

> The installer seems to work as expected, entirely 'hands-free'
> so-to-speak, installing the entire list of downloaded packages, but for
> some reason it fails to create a home directory for the currently logged
> in user and it fails to source the necessary profiles when Bash is
> started from the short cut, so the path is somewhat minimal and you just
> get a 'bash-3.2$' prompt rather than the usual customised version.

  Yes, that's not part of setup's job.  It happens the first time you fire up
a bash shell: default profile scripts are copied from /etc/skel, and you are
instructed to run mkpasswd and mkgroup with the -l or -d (or both) switches to
set up the passwd and groups files.  Take a look at /etc/profile:

# If the home directory doesn't exist, create it.

and

# Check to see if mkpasswd/mkgroup needs to be run try and cut down the emails
#   about this on the lists!

> Any help you could give in finding a workaround for this would be
> gratefully appreciated.

  Well, crudely speaking, you could probably add a call to the system()
function to invoke the Cygwin.bat script in the cygwin root dir.  That would
copy the skeleton files across to the user's new $HOME, but you'd still need
to get the passwd and groups files set up somehow.  You could use system()
calls to invoke mkpasswd and mkgroup as well, or you could add a script
somewhere, and just invoke that; there's probably half-a-dozen ways of doing
it that amount to the same thing but differ in minor details.

    cheers,
      DaveK
-- 
Can't think of a witty .sigline today....


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]