Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions overlays/configs/update-motd.d/00-flipperone
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,20 @@ 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 <<EOF

Welcome to FlipperOne

Git: $build_git
Board: $board
Profile: $profile
CPU Serial: $serial
Memory: $total_mem
Build ID: $build_id
Expand Down