File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change 1- #! /bin/bash
1+ #! /bin/sh
22
33# Some of the regex's used in sed
44# 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"
@@ -68,7 +68,7 @@ display_info_drm() {
6868 cardfound=1
6969 fi
7070 done
71- if [ " $cardfound " == " 0" ];
71+ if [ " $cardfound " = " 0" ];
7272 then
7373 echo " kms state not found"
7474 echo
@@ -115,7 +115,7 @@ display_info_legacy() {
115115
116116 if pgrep Xorg > /dev/null &&
117117 command -v xrandr > /dev/null &&
118- DISPLAY=${DISPLAY:-: 0} xrandr --listmonitors & > /dev/null; then
118+ DISPLAY=${DISPLAY:-: 0} xrandr --listmonitors > /dev/null 2>&1 ; then
119119 DISPLAY=${DISPLAY:-: 0} xrandr --verbose
120120 echo
121121 fi
@@ -171,7 +171,11 @@ OUT=raspinfo.txt
171171
172172rm -f $OUT
173173
174- exec > >( tee -ia $OUT )
174+ # avoid process substition bashism to generate logfile
175+ PIPE_PATH=$( mktemp -u)
176+ mkfifo $PIPE_PATH
177+ tee -ia $OUT < $PIPE_PATH &
178+ exec > $PIPE_PATH
175179
176180echo " System Information"
177181echo " ------------------"
You can’t perform that action at this time.
0 commit comments