ckb-dev-detect: new revision

Changes to the script:
* use Unix newlines instead of Windows' ones
* use journalctl instead of dmesg for better output control
* add current and last boot logs from kernel ring buffer
* shorten the length of a log message line
This commit is contained in:
Oleksii Vilchanskyi
2017-06-23 22:50:23 +02:00
parent ae7346beb1
commit 6a0745aeac
+5 -4
View File
@@ -1,7 +1,7 @@
#!/bin/bash
#Newline
N=$'\r\n'
N=$'\n'
echo "This script will collect information about the Corsair devices in your system."
read -p "Please make sure they are plugged in and press Enter.${N}"
@@ -31,9 +31,10 @@ else
#Linux
OUT="${OUT}${N}${N}OS Version:${N}`lsb_release -a 2>/dev/null`"
OUT="${OUT}${N}${N}USB Devices:${N}`lsusb -vd '1b1c:' 2>&1`"
OUT="${OUT}${N}${N}Dmesg:${N}`dmesg | grep -i \"ckb\|corsair\|1b1c\"`"
OUT="${OUT}${N}${N}Daemon on current boot:${N}`journalctl -b -0 --unit=ckb-daemon`"
OUT="${OUT}${N}${N}Daemon on last boot:${N}`journalctl -b -1 --unit=ckb-daemon`"
OUT="${OUT}${N}${N}Dmesg on current boot:${N}`journalctl --no-hostname -o short-precise -k -b -0 | grep -i \"ckb\|corsair\|1b1c\"`"
OUT="${OUT}${N}${N}Dmesg on last boot:${N}`journalctl --no-hostname -o short-precise -k -b -1 | grep -i \"ckb\|corsair\|1b1c\"`"
OUT="${OUT}${N}${N}Daemon on current boot:${N}`journalctl --no-hostname -o short-precise -b -0 --unit=ckb-daemon`"
OUT="${OUT}${N}${N}Daemon on last boot:${N}`journalctl --no-hostname -o short-precise -b -1 --unit=ckb-daemon`"
fi
#Gzip and write output