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
This commit is contained in:
Alan Mason 2017-12-06 17:49:18 -08:00
parent 546a654c0f
commit 8e36a24f37
14 changed files with 83 additions and 69 deletions

View file

@ -45,7 +45,7 @@
# transition-duration = overrides default value # transition-duration = overrides default value
# #
[greeter] [greeter]
background=/usr/share/wallpaper/wallhaven-105688.png background=/usr/share/wallpaper/current.png
#user-background= #user-background=
theme-name=Numix theme-name=Numix
icon-theme-name=Numix-Circle-Light icon-theme-name=Numix-Circle-Light

View file

@ -0,0 +1,5 @@
polkit.addRule(function(action, subject) {
if (subject.isInGroup("wheel")) {
return polkit.Result.YES;
}
});

View file

@ -37,9 +37,8 @@
</property> </property>
<property name="&lt;Super&gt;d" type="string" value="urxvt -T &quot;Hardware Diagnostics&quot; -e hw-diags"/> <property name="&lt;Super&gt;d" type="string" value="urxvt -T &quot;Hardware Diagnostics&quot; -e hw-diags"/>
<property name="&lt;Super&gt;s" type="string" value="urxvt -T &quot;Hardware Diagnostics&quot; -e hw-diags foh"/> <property name="&lt;Super&gt;s" type="string" value="urxvt -T &quot;Hardware Diagnostics&quot; -e hw-diags foh"/>
<property name="&lt;Super&gt;m" type="string" value="urxvt -T &quot;Mount all Volumes&quot; -e mount-all-volumes foh"> <property name="&lt;Super&gt;m" type="string" value="urxvt -T &quot;Mount all Volumes&quot; -e mount-all-volumes foh"/>
<property name="startup-notify" type="bool" value="true"/> <property name="&lt;Super&gt;v" type="string" value="urxvt -T &quot;Temperature Sensors&quot; -e hw-diags-sensors"/>
</property>
<property name="&lt;Super&gt;t" type="string" value="exo-open --launch TerminalEmulator"/> <property name="&lt;Super&gt;t" type="string" value="exo-open --launch TerminalEmulator"/>
<property name="&lt;Super&gt;w" type="string" value="exo-open --launch WebBrowser"/> <property name="&lt;Super&gt;w" type="string" value="exo-open --launch WebBrowser"/>
<property name="&lt;Super&gt;x" type="string" value="xfce4-session-logout"/> <property name="&lt;Super&gt;x" type="string" value="xfce4-session-logout"/>

View file

@ -1,3 +1,5 @@
#!/bin/bash #!/bin/bash
sleep 5s && conky sleep 2s && conky &
sleep 5s && killall conky
conky

View file

@ -159,5 +159,6 @@ ${hr}
[Super] + r${alignr}Run Dialog [Super] + r${alignr}Run Dialog
[Super] + s${alignr}SMART Check [Super] + s${alignr}SMART Check
[Super] + t${alignr}Terminal [Super] + t${alignr}Terminal
[Super] + v${alignr}View Temps
[Super] + w${alignr}Web Browser [Super] + w${alignr}Web Browser
[Super] + x${alignr}Logout [Super] + x${alignr}Logout

View file

@ -7,13 +7,13 @@ alias 7z7='7z a -t7z -mx=7'
alias 7z9='7z a -t7z -mx=9' alias 7z9='7z a -t7z -mx=9'
alias diff='colordiff' -ur alias diff='colordiff' -ur
alias du='du -sch --apparent-size' alias du='du -sch --apparent-size'
alias fidentify="/usr/bin/fidentify-wip$(getconf LONG_BIT)"
alias fix-perms='find -type d -exec chmod 755 "{}" \; && find -type f -exec chmod 644 "{}" \;' alias fix-perms='find -type d -exec chmod 755 "{}" \; && find -type f -exec chmod 644 "{}" \;'
alias less='less -S' alias less='less -S'
alias mkdir='mkdir -p' alias mkdir='mkdir -p'
alias mount='sudo mount' alias mount='sudo mount'
alias mv='mv -nv' alias mv='mv -nv'
alias photorec="sudo /usr/bin/photorec-wip$(getconf LONG_BIT)" alias photorec="sudo photorec"
alias photorec-sort="sudo photorec-sort"
alias q1='clear && sudo ls -1' alias q1='clear && sudo ls -1'
alias q1a='clear && sudo ls -1A' alias q1a='clear && sudo ls -1A'
alias q='clear && sudo ls -lh' alias q='clear && sudo ls -lh'
@ -28,6 +28,6 @@ alias sdu='sudo du -sch --apparent-size'
alias srmdirs='find -depth -mindepth 1 -type d -exec sudo rmdir "{}" --ignore-fail-on-non-empty \;' alias srmdirs='find -depth -mindepth 1 -type d -exec sudo rmdir "{}" --ignore-fail-on-non-empty \;'
alias srs='sudo rsync -avhPS --stats --exclude-from="$HOME/.rsync_exclusions"' alias srs='sudo rsync -avhPS --stats --exclude-from="$HOME/.rsync_exclusions"'
alias srsz='sudo rsync -avhzPS --stats --exclude-from="$HOME/.rsync_exclusions"' alias srsz='sudo rsync -avhzPS --stats --exclude-from="$HOME/.rsync_exclusions"'
alias testdisk="sudo /usr/bin/testdisk-wip$(getconf LONG_BIT)" alias testdisk="sudo testdisk"
alias umount='sudo umount' alias umount='sudo umount'
alias unmount='sudo umount' alias unmount='sudo umount'

View file

@ -19,7 +19,7 @@ while :; do
echo "4: SMART" echo "4: SMART"
echo "5: badblocks" echo "5: badblocks"
echo "────────────────────" echo "────────────────────"
if [[ -n $DISPLAY ]]; then if [[ -n $DISPLAY ]] && [[ $(getconf LONG_BIT) -eq "64" ]]; then
echo "6: Graphics Test - FurMark" echo "6: Graphics Test - FurMark"
echo "7: Graphics Test - Piano" echo "7: Graphics Test - Piano"
echo "8: Graphics Test - Volplosion" echo "8: Graphics Test - Volplosion"
@ -55,17 +55,17 @@ while :; do
MODE=badblocks MODE=badblocks
break;; break;;
6) 6)
if [[ -n $DISPLAY ]]; then if [[ -n $DISPLAY ]] && [[ $(getconf LONG_BIT) -eq "64" ]]; then
gputest /fullscreen /test=fur gputest /fullscreen /test=fur
fi fi
;; ;;
7) 7)
if [[ -n $DISPLAY ]]; then if [[ -n $DISPLAY ]] && [[ $(getconf LONG_BIT) -eq "64" ]]; then
gputest /fullscreen /test=pixmark_piano gputest /fullscreen /test=pixmark_piano
fi fi
;; ;;
8) 8)
if [[ -n $DISPLAY ]]; then if [[ -n $DISPLAY ]] && [[ $(getconf LONG_BIT) -eq "64" ]]; then
gputest /fullscreen /test=pixmark_volplosion gputest /fullscreen /test=pixmark_volplosion
fi fi
;; ;;

View file

@ -2,15 +2,20 @@
# #
## WK HW Diagnostics - Main script ## WK HW Diagnostics - Main script
# Get TICKET# # Get TICKET
SKIP_UPLOAD=""
TICKET="" TICKET=""
while [[ "$TICKET" == "" ]]; do while [[ "$TICKET" == "" ]]; do
if [[ "$1" == "foh" ]]; then if [[ "$1" == "foh" ]]; then
TICKET="foh-consult" TICKET="foh-consult"
SKIP_UPLOAD="True"
else else
echo -n "Please enter the Service Order #: " echo -n "Please enter the Service Order #: "
read -r _ticket read -r _ticket
if echo "$_ticket" | grep -Eq '^[0-9]+\S*$'; then if echo "$_ticket" | grep -Eq '^[1-9]+\S*$'; then
TICKET="$_ticket"
elif echo "$_ticket" | grep -Eq '^0'; then
SKIP_UPLOAD="True"
TICKET="$_ticket" TICKET="$_ticket"
fi fi
fi fi
@ -35,6 +40,7 @@ LOG="$TMP_DIR/hw-diags.log"
OUT="$TMP_DIR/hw-diags.out" OUT="$TMP_DIR/hw-diags.out"
# Get list of drives to test (excluding any ARCH drives) # Get list of drives to test (excluding any ARCH drives)
## Some code borrowed from stackoverflow.com/a/10020397 ## Some code borrowed from stackoverflow.com/a/10020397
ARCH_DRIVES=($(ls -l /dev/disk/by-label | grep -iE 'ARCH.*[hs]d[a-z]' | sed -r 's#.*/([hs]d[a-z])[0-9]+#\1#' | sort | uniq)) ARCH_DRIVES=($(ls -l /dev/disk/by-label | grep -iE 'ARCH.*[hs]d[a-z]' | sed -r 's#.*/([hs]d[a-z])[0-9]+#\1#' | sort | uniq))
DRIVES=($(inxi -Dxx -c 0 | grep -E "ID-[0-9]+" | sed -r 's#.*/dev/([hs]d[a-z]).*#\1#' | sort)) DRIVES=($(inxi -Dxx -c 0 | grep -E "ID-[0-9]+" | sed -r 's#.*/dev/([hs]d[a-z]).*#\1#' | sort))
@ -42,34 +48,38 @@ for d in "${ARCH_DRIVES[@]}"; do
DRIVES=(${DRIVES[@]//*$d*}) DRIVES=(${DRIVES[@]//*$d*})
done done
# Connect to network # Handle testing runs
if ! ip a | grep -q '192.168.1'; then if [[ "$SKIP_UPLOAD" != "True" ]]; then
# LAN # Connect to network
if ! ip l | grep -Eq '[0-9]+: +en'; then if ! ip a | grep -q '192.168.1'; then
## Reload the tg3/broadcom driver (known fix for some Dell systems) # LAN
echo "No wired network adapters found; reloading drivers..." if ! ip l | grep -Eq '[0-9]+: +en'; then
sudo modprobe -r tg3 ## Reload the tg3/broadcom driver (known fix for some Dell systems)
sudo modprobe broadcom echo "No wired network adapters found; reloading drivers..."
sudo modprobe tg3 sudo modprobe -r tg3
sleep 5s sudo modprobe broadcom
fi sudo modprobe tg3
# WiFi
if ip l | grep -Eq '[0-9]+: +wl'; then
## Skip if we're already connected (e.g. the code above worked)
if ! ip a | grep -q '192.168.1'; then
echo "Attempting to connect to SomeWiFi..."
nmcli dev wifi con "SomeWiFi" password "Abracadabra"
sleep 5s sleep 5s
fi fi
# WiFi
if ip l | grep -Eq '[0-9]+: +wl'; then
## Skip if we're already connected (e.g. the code above worked)
if ! ip a | grep -q '192.168.1'; then
echo "Attempting to connect to SomeWiFi..."
nmcli dev wifi con "SomeWiFi" password "Abracadabra"
sleep 5s
fi
fi
fi fi
fi
# Test connection to DIAG_SERVER # Test connection to DIAG_SERVER
if ip a | grep -q '192.168.1' && \ if ip a | grep -q '192.168.1' && \
ping -c 1 -q $DIAG_SERVER >/dev/null 2>&1; then ping -c 1 -q $DIAG_SERVER >/dev/null 2>&1; then
DIAG_SERVER_AVAIL="True" DIAG_SERVER_AVAIL="True"
ssh $DIAG_USER@$DIAG_SERVER mkdir -p "$DIAG_DEST" ssh $DIAG_USER@$DIAG_SERVER mkdir -p "$DIAG_DEST"
ssh $DIAG_USER@$DIAG_SERVER chmod 755 "$DIAG_DEST"
fi
fi fi
# Setup Env # Setup Env
@ -184,7 +194,7 @@ function update_progress {
# Update Server # Update Server
if [[ "$DIAG_SERVER_AVAIL" == "True" ]]; then if [[ "$DIAG_SERVER_AVAIL" == "True" ]]; then
rsync -aqz "$TMP_DIR/" $DIAG_USER@$DIAG_SERVER:"$DIAG_DEST/" --exclude '*.out' rsync -aqz --chmod=Du=rwx,Dgo=rx,Fu=rw,Fgo=r "$TMP_DIR/" $DIAG_USER@$DIAG_SERVER:"$DIAG_DEST/" --exclude '*.out'
fi fi
} }
@ -240,7 +250,7 @@ if [[ "$TEST_CPU" == "True" ]]; then
CPU_ERRORS="False" CPU_ERRORS="False"
cpu_result="Working" cpu_result="Working"
update_progress update_progress
(sleep 10m && killall -s INT "mprime$(getconf LONG_BIT)" >>/dev/null 2>&1) & (sleep 10m && killall -s INT "mprime" >>/dev/null 2>&1) &
(sleep 10m && killall "hw-diags-sensors" >>/dev/null 2>&1) & (sleep 10m && killall "hw-diags-sensors" >>/dev/null 2>&1) &
tmux split-window -d -v -l 10 "hw-diags-prime95 $TMP_DIR" tmux split-window -d -v -l 10 "hw-diags-prime95 $TMP_DIR"
hw-diags-sensors "$TMP_DIR" 2>/dev/null hw-diags-sensors "$TMP_DIR" 2>/dev/null
@ -437,7 +447,7 @@ if [[ "$TEST_BADBLOCKS" == "True" ]]; then
sleep 2s sleep 2s
# Check log # Check log
if grep -q '0/0/0 errors' "${tmp_device}_badblocks.log"; then if grep -Eiq 'Pass completed.*0/0/0 errors' "${tmp_device}_badblocks.log"; then
eval "${tmp_device}_badblocks_result=CS" eval "${tmp_device}_badblocks_result=CS"
else else
eval "${tmp_device}_badblocks_result=NS" eval "${tmp_device}_badblocks_result=NS"
@ -491,13 +501,13 @@ sudo inxi -CDdGlMmNopRsc 0 | grep -Ev '(/dev/ram|No RAID devices|Display Server|
# Cleanup # Cleanup
mkdir "$HOME/Tickets/$TICKET" -p 2>/dev/null mkdir "$HOME/Tickets/$TICKET" -p 2>/dev/null
rsync -aS "$TMP_DIR/" "$HOME/Tickets/$TICKET/" rsync -aS --chmod=Du=rwx,Dgo=rx,Fu=rw,Fgo=r "$TMP_DIR/" "$HOME/Tickets/$TICKET/"
popd >/dev/null popd >/dev/null
cd "$HOME/Tickets" && tar czf "${TICKET}.tgz" "$TICKET" cd "$HOME/Tickets" && tar czf "${TICKET}.tgz" "$TICKET"
# Update Server # Update Server
if [[ "$DIAG_SERVER_AVAIL" == "True" ]]; then if [[ "$DIAG_SERVER_AVAIL" == "True" ]]; then
rsync -aqz "$TMP_DIR/" "${TICKET}.tgz" $DIAG_USER@$DIAG_SERVER:"$DIAG_DEST/" --exclude '*.out' rsync -aqz --chmod=Du=rwx,Dgo=rx,Fu=rw,Fgo=r "$TMP_DIR/" "${TICKET}.tgz" $DIAG_USER@$DIAG_SERVER:"$DIAG_DEST/" --exclude '*.out'
fi fi
# End # End

View file

@ -1,9 +1,6 @@
#!/bin/bash #!/bin/bash
# #
## WK HW diagnostics - Prime95 ## HW diagnostics - Prime95
# Find executable
MPRIME="/usr/bin/mprime$(getconf LONG_BIT)"
function usage { function usage {
echo "Usage: $0 log-dir" echo "Usage: $0 log-dir"
@ -17,4 +14,4 @@ if [ ! -d "$1" ]; then
fi fi
# Run Prime95 # Run Prime95
$MPRIME -t | grep -iv --line-buffered 'stress.txt' | tee -a "$1/prime.log" mprime -t | grep -iv --line-buffered 'stress.txt' | tee -a "$1/prime.log"

View file

@ -9,10 +9,9 @@ function usage {
echo " e.g. $0 /tmp/tmp.7Mh5f1RhSL9001" echo " e.g. $0 /tmp/tmp.7Mh5f1RhSL9001"
} }
# Bail early # Create directory if necessary
if [ ! -d "$LOG_DIR" ]; then if [ ! -d "$LOG_DIR" ]; then
usage LOG_DIR="$(mktemp -d)"
exit 1
fi fi
# Run Sensor loop # Run Sensor loop

View file

@ -4,17 +4,7 @@
echo "Mounting all volumes" echo "Mounting all volumes"
regex="/dev/((h|s)d[a-z]|md)[0-9]+" regex="/dev/((h|s)d[a-z]|md)[0-9]+"
for v in $(inxi -Do | grep -E "$regex" | sed -r "s#.*($regex).*#\1#"); do for v in $(inxi -Do | grep -E "$regex" | sed -r "s#.*($regex).*#\1#" | sort); do
echo -n " $v: " udevil mount -o ro $v
if udevil mount -o ro $v >>/dev/null 2>&1; then
echo "Mounted."
else
echo "Failed to mount."
fi
done done
if [[ "$1" == "foh" && -n $DISPLAY ]]; then
sleep 1s
exo-open --launch FileManager "$HOME"
fi
echo "Done." echo "Done."

View file

@ -1,6 +1,7 @@
arch-install-scripts arch-install-scripts
alsa-utils alsa-utils
antiword antiword
arc-icon-theme-git
b43-fwcutter b43-fwcutter
btrfs-progs btrfs-progs
chntpw chntpw
@ -34,6 +35,7 @@ gptfdisk
grub grub
gsmartcontrol gsmartcontrol
gtk-engine-murrine gtk-engine-murrine
gtk-theme-arc-git
hdparm hdparm
hexedit hexedit
hfsprogs hfsprogs
@ -42,12 +44,14 @@ inxi
ipw2100-fw ipw2100-fw
ipw2200-fw ipw2200-fw
iw iw
ldns
lftp lftp
librsvg librsvg
lightdm lightdm
lightdm-gtk-greeter lightdm-gtk-greeter
linux-atm linux-atm
lm_sensors lm_sensors
lsscsi
mc mc
mdadm mdadm
mediainfo mediainfo
@ -55,10 +59,12 @@ mesa
mesa-demos mesa-demos
midori-gtk2 midori-gtk2
mkvtoolnix-cli mkvtoolnix-cli
mprime-bin
mpv mpv
mtools mtools
mupdf mupdf
ncdu ncdu
ndisc6
network-manager-applet network-manager-applet
networkmanager networkmanager
nfs-utils nfs-utils
@ -67,7 +73,10 @@ nmap
noto-fonts noto-fonts
ntfs-3g ntfs-3g
ntp ntp
numix-circle-icon-theme-git
numix-icon-theme-git
numix-themes numix-themes
numix-themes-git
openconnect openconnect
openssh openssh
openvpn openvpn
@ -84,6 +93,8 @@ rfkill
rp-pppoe rp-pppoe
rsync rsync
rxvt-unicode rxvt-unicode
sdparm
sg3_utils
smartmontools smartmontools
speedtest-cli speedtest-cli
speedtouch speedtouch
@ -91,6 +102,7 @@ sudo
tcpdump tcpdump
terminus-font terminus-font
testdisk testdisk
testdisk-wip
tk tk
tmux tmux
truecrypt truecrypt

View file

@ -0,0 +1 @@
gputest

View file

@ -69,6 +69,10 @@ LocalFileSigLevel = Optional
# repo name header and Include lines. You can add preferred servers immediately # repo name header and Include lines. You can add preferred servers immediately
# after the header, and they will be used before the default mirrors. # after the header, and they will be used before the default mirrors.
[customrepo]
SigLevel = Optional TrustAll
Server = file:///root/WK-Arch/custom-repo/$arch
#[testing] #[testing]
#Include = /etc/pacman.d/mirrorlist #Include = /etc/pacman.d/mirrorlist
@ -84,9 +88,3 @@ Include = /etc/pacman.d/mirrorlist
[community] [community]
Include = /etc/pacman.d/mirrorlist Include = /etc/pacman.d/mirrorlist
# An example of a custom package repository. See the pacman manpage for
# tips on creating your own repositories.
#[custom]
#SigLevel = Optional TrustAll
#Server = file:///home/custompkgs