Skip to content

Commit

Permalink
Update packages/bsp/common/etc/update-motd.d/10-armbian-header
Browse files Browse the repository at this point in the history
Co-authored-by: Fridtjof Mund <[email protected]>
  • Loading branch information
igorpecovnik and fridtjof committed Feb 19, 2025
1 parent 7f2752f commit 1a95ebf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
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 @@ -94,7 +94,7 @@ echo -e "\e[1;91m$(figlet -f small " $VENDOR")\e[0m";

# Read RPI model from cpuinfo
if [[ $BOARD == rpi4b ]]; then
BOARD_NAME=$(grep "Model" /proc/cpuinfo | sed -E 's/^Rev //; s/ Rev [0-9.]+$//' | cut -d":" -f2 | xargs)
BOARD_NAME=$(cat /proc/device-tree/model | tr '\0' '\n' | sed -E 's/ Rev [0-9.]+$//')
fi

# Display version, board, and kernel version
Expand Down
2 changes: 1 addition & 1 deletion packages/bsp/common/usr/lib/armbian/armbian-firstrun
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ case "$1" in

# adjust hostname for rpi's
if [[ "${BOARD}" == rpi4b && "$(cat /etc/hostname)" == rpi4b ]]; then
BOARD_NAME=$(grep "Model" /proc/cpuinfo | sed -E 's/^Rev //; s/ Rev [0-9.]+$//' | cut -d":" -f2 | xargs)
BOARD_NAME=$(cat /proc/device-tree/model | tr '\0' '\n' | sed -E 's/ Rev [0-9.]+$//')
[[ "$BOARD_NAME" == *"Zero 2 W"* ]] && NEW_HOSTNAME="rpizero2w"
[[ "$BOARD_NAME" == *"Pi 5 Model B"* ]] && NEW_HOSTNAME="rpi5b"
[[ "$BOARD_NAME" == *"Pi 3 Model B"* ]] && NEW_HOSTNAME="rpi3b"
Expand Down

0 comments on commit 1a95ebf

Please sign in to comment.