WizardKit/archlive/airootfs/usr/local/bin/hw-diags
Alan Mason 8e36a24f37 2016-06: Retroactive Updates
* Added HW-Sensors alias and keyboard shortcut
* Added new packages to packages.both (from 2016.06 archiso update)
* Disabled gputests for i686 builds
* Errors would cause an incomplete line to be left in the log causing a false-positive
* HW-Diags will no longer upload results if the Ticket# starts with '0'
  * Added chmod flags to the rsync upload
* Initial work to add custom-repos
* Open GUI progs without entering a password (e.g. GParted)
* The wallpaper should now be loaded from the UFD.
  * Still need to move scripts or add a "settings" file
* mount-all-volumes now shows the mount-points while mounting (like running manually)
* photorec-sort 7z archive testing is currently stalling, disabled for now
2017-12-06 17:49:18 -08:00

86 lines
2.4 KiB
Bash

#!/bin/bash
#
## WK HW diagnostics - Launcher
MODE="$1"
# Ensure a proper mode is selected
while :; do
if [[ "$MODE" =~ ^(all|cpu|drives|foh|smart|badblocks)$ ]]; then
break
else
clear
echo "Hardware Diagnostics"
echo "────────────────────"
echo "0: Quick drive test"
echo "1: All tests"
echo "2: Prime95"
echo "3: SMART & badblocks"
echo "4: SMART"
echo "5: badblocks"
echo "────────────────────"
if [[ -n $DISPLAY ]] && [[ $(getconf LONG_BIT) -eq "64" ]]; then
echo "6: Graphics Test - FurMark"
echo "7: Graphics Test - Piano"
echo "8: Graphics Test - Volplosion"
fi
echo "A: Speaker Test"
if [[ -n $DISPLAY ]]; then
echo "K: Keyboard Test"
fi
echo "────────────────────"
echo ""
echo "Q: Quit"
echo ""
read -r -p "Please make a selection: " MODE
# Check input
case $MODE in
0)
MODE=foh
break;;
1)
MODE=all
break;;
2)
MODE=cpu
break;;
3)
MODE=drives
break;;
4)
MODE=smart
break;;
5)
MODE=badblocks
break;;
6)
if [[ -n $DISPLAY ]] && [[ $(getconf LONG_BIT) -eq "64" ]]; then
gputest /fullscreen /test=fur
fi
;;
7)
if [[ -n $DISPLAY ]] && [[ $(getconf LONG_BIT) -eq "64" ]]; then
gputest /fullscreen /test=pixmark_piano
fi
;;
8)
if [[ -n $DISPLAY ]] && [[ $(getconf LONG_BIT) -eq "64" ]]; then
gputest /fullscreen /test=pixmark_volplosion
fi
;;
a|A|audio|Audio)
hw-diags-audio;;
k|K|keyboard|Keyboard)
if [[ -n $DISPLAY ]]; then
xev
fi
;;
q|Q|quit|Quit)
exit 1;;
esac
fi
done
# Start tmux
tmux new-session -s 'hw-session' -n 'hw-window' "hw-diags-inner $MODE"