This is the mail archive of the
mailing list for the Cygwin project.
RE: Unattended installation of the entire Cygwin build
- From: "Dave Korn" <dave dot korn at artimi dot com>
- To: <cygwin-apps at cygwin dot com>
- Date: Wed, 11 Apr 2007 19:14:28 +0100
- Subject: RE: Unattended installation of the entire Cygwin build
- References: <461D2176.firstname.lastname@example.org>
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.
# 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.
Can't think of a witty .sigline today....