diff --git a/overlays/configs/update-motd.d/00-flipperone b/overlays/configs/update-motd.d/00-flipperone index f122f30..d783703 100755 --- a/overlays/configs/update-motd.d/00-flipperone +++ b/overlays/configs/update-motd.d/00-flipperone @@ -15,6 +15,12 @@ build_git=${BUILD_GIT:-unknown} total_mem=$(awk '/MemTotal/ {printf "%.1f GB", $2/1024/1024}' /proc/meminfo) +# Currently booted profile = the btrfs subvolume mounted as root (@Desktop, +# @Router, @TV-Media-Box, @Minimal). "/@Foo" -> "Foo"; non-subvolume -> unknown. +profile=$(findmnt -nro FSROOT / 2>/dev/null) +profile=${profile#/} +[ -n "$profile" ] && [ "$profile" != "/" ] || profile=unknown + # Generate MOTD cat <