Skip to content

Commit

Permalink
UX / cosmetics: MOTD ip display needs some limiting
Browse files Browse the repository at this point in the history
- switch MOTD download to new central location https://github.armbian.com/
- move cronjob for MOTD download from weekly to daily
- change mord defaults, remove clear from defaults
  • Loading branch information
igorpecovnik committed Feb 8, 2025
1 parent da577fe commit 7901e1b
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
3 changes: 3 additions & 0 deletions packages/bsp/common/etc/cron.daily/armbian-quotes
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash

curl --max-time 2 -L -s -o "/tmp/quotes.txt" "https://github.armbian.com/quotes.txt"
3 changes: 0 additions & 3 deletions packages/bsp/common/etc/cron.weekly/armbian-quotes

This file was deleted.

4 changes: 2 additions & 2 deletions packages/bsp/common/etc/default/armbian-motd.dpkg-dist
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
# ONE_WIRE="yes" show 1-wire temperature sensor if attached
# PRIMARY_DIRECTION="rx" show daily traffic stats, options: "rx", "tx", "both", "off", vnstat needs to be installed

MOTD_DISABLE=""
MOTD_DISABLE="clear"
ONE_WIRE=""
HIDE_IP_PATTERN="^dummy0|^lo|^docker|^hassio"
HIDE_IP_PATTERN="^dummy0|^lo|^docker|^hassio|^br-|^veth"
PRIMARY_INTERFACE="$(ip route | grep '^default' | sed "s/.*dev //" | cut -d" " -f1)"
PRIMARY_DIRECTION="rx"
STORAGE=/dev/sda1
Expand Down
2 changes: 1 addition & 1 deletion packages/bsp/common/etc/update-motd.d/10-armbian-header
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

THIS_SCRIPT="header"
MOTD_DISABLE=""
HIDE_IP_PATTERN="^dummy0|^lo|^docker"
HIDE_IP_PATTERN="^dummy0|^lo|^docker|^hassio|^br-|^veth"

# Read image configuration
[[ -f /etc/armbian-image-release ]] && . /etc/armbian-image-release
Expand Down
4 changes: 2 additions & 2 deletions packages/bsp/common/etc/update-motd.d/30-armbian-sysinfo
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,8 @@ display " Memory usage" "$memory_usage" "70" "0" "%" " of ${memory_total}"
display "Zram usage" "$swap_usage" "75" "0" "%" " of ${swap_total}"
echo "" # fixed newline
display " CPU temp" "$board_temp" $CPU_TEMP_LIMIT "0" "°C" ""
display "Ambient temp" "$amb_temp" $AMB_TEMP_LIMIT "0" "°C" ""
display "Usage of /" "$root_usage" "90" "1" "%" " of $root_total $overlay_root"
display " Ambient temp" "$amb_temp" $AMB_TEMP_LIMIT "0" "°C" ""
display " Usage of /" "$root_usage" "90" "1" "%" " of $root_total $overlay_root"
if command -v overlayroot-chroot > /dev/null 2>&1 && findmnt -k /media/root-ro | tail -1 | grep -w /media/root-ro > /dev/null 2>&1; then
echo -ne "\x1B[91m(read only rootfs)\x1B[0m"
fi
Expand Down

0 comments on commit 7901e1b

Please sign in to comment.