d-i preseed/late_command to append a file content in the user's .bashrc
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
Reply to: