Re: [13.1] Creating a file in the user's home

Robert Munteanu <[email protected]> Thu, 31 Jul 2014 23:41:34 +0300
Newsgroups gmane.linux.suse.autoinstall
Message-ID <CAC8ULPaGCOQsXntF_VkoK+DYpQOr+RH9gQ+WQne_R9QY1g30hg@mail.gmail.com>
On Thu, Jul 31, 2014 at 6:59 PM, Thomas Fehr <[email protected]> wrote:
> Hi,
>
> On Thu, Jul 31, Robert Munteanu wrote:
>
>> Hi,
>>
>> As part of my autoinst.xml file I want to place a file in a specific
>> user's home. Initially I tried to do it with a post-script, but that
>> failed since the user's home was not yet created
>
> I assume you create the user as part of the <users> section in autoinst.xml .
> post-scripts are called before second stage configuration (like e.g. creating
> users) are done so the user and its home dir does not yet exist.
>
> Solutions:
> 1) You could use a init-script, it is run after all configuration is done
>    and all services are up and running

A init-script worked perfectly, thank you.

Robert

> 2) you create the user via a call to useradd in the post-script before putting
>    the file into its home directory. In this case the user should be removed
>    from <users> section in autoinst.xml
>
> Bye,
>         Thomas Fehr
> --
>   Thomas Fehr, SuSE Linux Products GmbH, Maxfeldstr. 5, 90409 Nuernberg, Germany
>   GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg)
>   Tel: +49-911-74053-0,  Fax: +49-911-74053-482,  Email: [email protected]
>   GPG public key available.
> --
> To unsubscribe, e-mail: [email protected]
> To contact the owner, e-mail: [email protected]
>



-- 
http://robert.muntea.nu/
-- 
To unsubscribe, e-mail: [email protected]
To contact the owner, e-mail: [email protected]