Index: [Article Count Order] [Thread]

Date:  Mon, 3 Mar 2008 10:28:54 -0600
From:  Larry Smith <lesmith (at mark) ecsis.net>
Subject:  [coba-e:12171] Re: AW:  Provisioning
To:  coba-e (at mark) bluequartz.org
Message-Id:  <200803031028.54890.lesmith (at mark) ecsis.net>
In-Reply-To:  <01E188343A33DE4E8B1A00D7980BC879023A47E4 (at mark) s2.combox.de>
References:  <01E188343A33DE4E8B1A00D7980BC879023A47E4 (at mark) s2.combox.de>
X-Mail-Count: 12171

On Mon March 3 2008 09:18, Tobias Gablunsky wrote:
> > -----Original Message-----
> > From: Larry Smith [mailto:lesmith (at mark) ecsis.net]
> > Sent: Monday, March 03, 2008 2:04 PM
> > To: coba-e (at mark) bluequartz.org
> > Subject: [coba-e:12168] Re: AW: Provisioning
> >
> > On Mon March 3 2008 05:50, Tobias Gablunsky wrote:
> > > > Believe the BQ system still uses the /etc/skel structure
> >
> > (according to
> >
> > > > the programs anyway) so you should be able to create the structure
> > > > or template of what you want in an user account in
> > > > /etc/skel/user/<lang>
> > > > directory and it will "recreate" that for each user you add
> > > > to the system.
> > > > (where <lang> is the two letter language abbreviation).
> > > >
> > > > --
> > > > Larry Smith
> > > > lesmith (at mark) ecsis.net
> > >
> > > Thanks for your hint!
> > >
> > > This works perfectly for files and folders I put into the /etc/skel
> > > structure - but not if they are hidden.
> > >
> > > As there are hidden files that are copied into a new users
> >
> > home (e.g.
> >
> > > /etc/skel/.bashrc) it cannot just be the hidden type of the
> >
> > file. Any more
> >
> > > ideas?
> >
> > Appears the "hidden" files are directly referenced
> > in /usr/sausalito/perl/Base/User.pm, so you may have to
> > modify that file
> > to get your hidden files to copy, but reading the program(s), it uses
> > "cp -r /etc/skel/user/<lang>" to copy the files which should also get
> > any hidden (leading dot) files.  Check the mode and ownership of any
>
> This is right but you are wrong ;)
>
> The above syntax is as you said, exactly on my system it is:
>
>                     system("/bin/cp -r $user->{skel}/*
> $user->{homedir}");
>                     system("/bin/cp /etc/skel/.bash* $user->{homedir}");
>
> And on the second line one can see that "cp -r" does not copy the hidden
> files on the first directory (the problem is the shell-expansion of
> "<path>/*"). So when I change the second line of the code above to
>
>                     system("/bin/cp /etc/skel/.* $user->{homedir}");
>
> (I remove the word "bash") then everything works as I want it to.
>
> Maybe someone on the list can say if it is of any risk to put this into
> the original package ("base-user-glue").
>
> Because I now have to deal with the files of the original distribution
> which is exactly what I tried to avoid.
>
> > files you have put under /etc/skel.
>
> Thanks for your help anyway,

Tobias,

  My "command" was not meant to be "exact" but to relay what 
the system was doing.  In that context, add _your_ hidden files
under the appropriate directory (/etc/skel/user/<lang>) and the
cp -r should get them correctly without any modification to the
system area programs.

> Thanks for your help anyway,

Not sure if I understand the context of the "anyway" in the above
statement, but I can most certainly stop answering any of your 
questions if my assistance is not helpful in "anyway".

-- 
Larry Smith
lesmith (at mark) ecsis.net