Custom .bashrc Topic is solved

Suggestions for features and software you would like to see in DietPi, goes here.
Post Reply
comas
Posts: 2
Joined: Tue Sep 08, 2020 9:54 am

Custom .bashrc

Post by comas »

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.
User avatar
MichaIng
Site Admin
Posts: 2333
Joined: Sat Nov 18, 2017 6:21 pm

Re: Custom .bashrc

Post by MichaIng »

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 :?.

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:

Code: Select all

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?
comas
Posts: 2
Joined: Tue Sep 08, 2020 9:54 am

Re: Custom .bashrc

Post by comas »

Thank you for your response!

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

Especially since there is a simple workaround!

Thank
Post Reply