read_keys() unless ($keys_last_read == -M ($keysfile));
- while (<$fh>)
+ READLOOP: while (<$fh>)
{
- next unless /UID/;
+ unless (/UID/)
+ {
+ close($fh);
+ system("/flash/tuer/reset_openpcd.sh");
+ last READLOOP;
+ }
my ($id) = /UID=(\S+)\s+/;
if ($good{$id})
{
--- /dev/null
+#!/bin/zsh
+local devPath
+for idVendor in /sys/bus/usb/devices/*/idVendor; do
+ devPath=${idVendor:h}
+ if [[ "$(< $idVendor)" == "16c0" && "$(< ${devPath}/idProduct )" == "076b" ]]; then
+ echo -n suspend >! ${devPath}/power/level
+ sleep 1
+ echo -n on >! ${devPath}/power/level
+ fi
+done