Skip to content
Open
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
12 changes: 8 additions & 4 deletions raspinfo/raspinfo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/bin/sh

# Some of the regex's used in sed
# Catch basic IP6 address "s/\([0-9a-fA-F]\{1,4\}:\)\{7,7\}[0-9a-fA-F]\{1,4\}/y.y.y.y.y.y.y.y/g"
Expand Down Expand Up @@ -68,7 +68,7 @@ display_info_drm() {
cardfound=1
fi
done
if [ "$cardfound" == "0" ];
if [ "$cardfound" = "0" ];
then
echo "kms state not found"
echo
Expand Down Expand Up @@ -115,7 +115,7 @@ display_info_legacy() {

if pgrep Xorg > /dev/null &&
command -v xrandr > /dev/null &&
DISPLAY=${DISPLAY:-:0} xrandr --listmonitors &>/dev/null; then
DISPLAY=${DISPLAY:-:0} xrandr --listmonitors >/dev/null 2>&1; then
DISPLAY=${DISPLAY:-:0} xrandr --verbose
echo
fi
Expand Down Expand Up @@ -171,7 +171,11 @@ OUT=raspinfo.txt

rm -f $OUT

exec > >(tee -ia $OUT)
# avoid process substition bashism to generate logfile
PIPE_PATH=$(mktemp -u)
mkfifo $PIPE_PATH
tee -ia $OUT < $PIPE_PATH &
exec > $PIPE_PATH

echo "System Information"
echo "------------------"
Expand Down