aboutsummaryrefslogtreecommitdiff
path: root/scripts/c6678_udev.sh
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/c6678_udev.sh')
-rw-r--r--scripts/c6678_udev.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/scripts/c6678_udev.sh b/scripts/c6678_udev.sh
new file mode 100644
index 0000000..e0d49a7
--- /dev/null
+++ b/scripts/c6678_udev.sh
@@ -0,0 +1,12 @@
+#!/bin/sh
+read vendor_value < $1/vendor
+read device_value < $1/device
+if [ "$vendor_value" = "0x104c" -a "$device_value" = "0xb005" ]
+then
+read switch_vendor_value < $1/../vendor
+read switch_device_value < $1/../device
+/usr/bin/find $1 -maxdepth 1 -name "resource*" -exec /bin/chmod ugo+rw {} +
+
+/bin/date >> /var/log/c6678_udev.log
+/bin/echo $1 : vendor:$vendor_value device:$device_value switch_vendor:$switch_vendor_value switch_device:$switch_device_value >>/var/log/c6678_udev.log
+fi