[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: d-i preseed/late_command to append a file content in the user's .bashrc




El 31/07/15 a las 08:13, Federico Bruni escribió:
> Hi all
>
> I'm trying to append my custom bash configuration to ~/.bashrc through
> preseed.cfg. I used this line at the end of my preseed.cfg:
>
> d-i preseed/late_command string cat /etc/skel/.mystuff-bashrc >> ~/.bashrc
>
> But it fails with exite code 1, without any further information. What's
> wrong in above line?
> I assumed that at the end of the installation the user home is already
> created and populated with files. Wrong assumption?
>
> I used to use config/includes.chroot/etc/skel/.bashrc to define my own
> .bashrc, but I think that I'd better put my changes in another file and
> then append them to the default .bashrc. This approach has two advantages:
>
> 1. No need to maintain my .bashrc when upgrading Debian.
> 2. If user messes up the bash files in the home, he can restore them
> easily:
>
>   cp /etc/skel/.bashrc ~/.bashrc
>   cat /etc/skel/.mystuff-bashrc >> ~/.bashrc
>
> Thanks in advance
> Federico
>
>
>
>
you must use in-target command to ejecute these stuff into the chroot
when installer is running

d-i preseed/late_command string in-target cat /etc/skel/.mystuff-bashrc
~/.bashrc



-- 
Fernando Toledo
Dock Sud BBS
http://bbs.docksud.com.ar
telnet://bbs.docksud.com.ar


Reply to: