I use SaltStack for configuration management and have a mixture of Linux distributions in my environment, including DietPi. I know DietPi is based on Debian 9+ and is reflected in the /etc/os-release
file. Distribution detection is primarily in lines 2063-2179 in the Salt grains core, but os-release doesn’t actually mention DietPi, so is detected as Debian/Raspbian which isn’t 100% accurate.
My question is: what would be the recommended way of detecting that an installation is in fact DietPi? A couple options I considered:
- Presence of
/boot/dietpi/
- Presence of
/boot/dietpi.txt
Those will work but feel very hacky. Any recommendations?