Automating DietPi configuration

Howdy all,
I use DietPi for over a month now, running in a virtual machine on my NAS. Hosting Pi-Hole and Unbound.
Plan was initially to use DietPi on my Rasp3B, but wanted to test in a VM first and I kept it running like this so far. I will install on the RPi soon anyway now I’m familiar with the system.
I’m experimenting with automated deployment, works fine so far and I will test soon executing the post installation script.

In that context, I have some questions about automating NFS mounts and how to leverage Drive Manager.
First of all, I only see one NFS mount at a time in DM, is that expected? I see 2 entries temporarily in fstab file, but it seems only the most recent will be kept eventually.
I didn’t see any option to run Drive Manager with options from CLI, only interactively. Is there anything foreseen to allow it?
Also, in the scope of automating, is it a good practice to add entries in fstab, or should network mounts happen through DM only?

Thank you, and long life to DietPi!

Drive manager is doing nothing else than creating entries within /etc/fstab. Ok in case of samba or nfs, it will install related client packages in addition. However these client packages can be installed using dietpi-software automation as well.

Thank you!
So basically I can script insertions into /etc/fstab, no need to bother with Drive Manager in that case. I can continue my experiments :slight_smile:

Correct

Hi there,
Made some progress, just had an issue with the custom script because using CRLF from Windows instead of LF from Unix for the file.
I was wondering if the different variables set in dietpi.txt file can be used in the script, i.e. are they set as environment variables during execution? Or should I rather “grep” in dietpi.txt?

Thank you.

nope you would need to grep them from the configuration file.