Custom .bashrc

Hi,

Thanks for your awesome work !

I think it would be nice to be able to set up a custom .bashrc during installation.

A .CustomBashrc file in the /boot folder that would be automatically placed in /root/.bashrc on installation.

A boolean in the file dietpi.txt could enable or disable the option.

Many thanks for your feedback and suggestion.

However, I’m afraid if we implement this, the next suggestion to allow a custom .profile or custom rc.local or systemd unit or any other config file appears. All this will be then used by 1 to 2 users, okay let’s say 20 after a while, but the code overhead stays for hundreds of thousands of systems and the continued maintenance of this feature stays for us :thinking:.

You have two ways to do customisation on first boot, aside of mounting and editing the image file directly of course (I know not possible on Windows due to ext4 file system…):
Create /boot/Automation_Custom_PreScript.sh which will be executed on very early first boot stage (before any network setup is done) to apply any customisation.
Create /boot/Automation_Custom_Script.sh which will be executed after first login during the setup steps when you optionally selected the first software to be installed, so network is assured to be there and all basic system setup has finished.
In dietpi.txt there is also explained how to use the related setting to download a script from web and have it executed:

AUTO_SETUP_CUSTOM_SCRIPT_EXEC=https://myweb.com/myscript.sh

Nice as you could host a script on an own Git repo and don’t need to alter the image, aside of dietpi.txt once.

I hope the above options basically cover your need?

Thank you for your response!

Indeed, I understand your problem, there are no worries.

Especially since there is a simple workaround!

Thank