Skip to content

Commit

Permalink
Merge pull request #23 from treellama/fix-issue-21
Browse files Browse the repository at this point in the history
fix detection of raspberry pi in rhw; fixes #21
  • Loading branch information
alexmyczko authored Oct 23, 2024
2 parents c177122 + 2478bd4 commit 94fd0d2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ruptime
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ done)
if [ -d /sys/firmware/efi/ ]; then sys=UEFI; else sys=BIOS; fi
# if macOS + arm64 then it's sys=AAPL
uname -o |grep ^Darwin >/dev/null && uname -m |grep ^arm64 >/dev/null && sys=AAPL
cat /sys/firmware/devicetree/base/compatible &>/dev/null | grep raspberry && sys=RASP
cat /sys/firmware/devicetree/base/compatible 2>/dev/null | grep raspberry &>/dev/null && sys=RASP
#/usr/sbin/lsmod|grep "^nvram " >/dev/null && head -1 /proc/driver/nvram |grep not >/dev/null; if [ "$?" -eq 0 ]; then cmos="CMOS+"; else cmos="CMOS-"; fi
which free >/dev/null && mem=$(free -b |grep ^Mem: |awk '{printf "%.0f\n", $2/1024/1024/1024}')
which free >/dev/null || mem=$(sysctl -n hw.memsize|awk '{printf "%.0f\n", $1/1024/1024/1024}')
Expand Down

0 comments on commit 94fd0d2

Please sign in to comment.