summaryrefslogtreecommitdiffstats
path: root/udev
diff options
context:
space:
mode:
authorGravatar Jonathan Beck2009-03-24 20:58:43 +0100
committerGravatar Jonathan Beck2009-03-24 20:58:43 +0100
commit85b8a301be39c4b86cb7f38e80c3cb592240ccb9 (patch)
tree4974fc254afbf0226e610fd962b5dc74c094cf9f /udev
parent19992c668afeb53a28e08a1f61572b5379f87590 (diff)
parent0114d8da493e69f14bc2669ae0ec6b9813b237cf (diff)
downloadlibimobiledevice-85b8a301be39c4b86cb7f38e80c3cb592240ccb9.tar.gz
libimobiledevice-85b8a301be39c4b86cb7f38e80c3cb592240ccb9.tar.bz2
Merge branch 'master' of git://github.com/MattColyer/libiphone into contact_sync
Conflicts: Makefile.am configure.ac src/AFC.h src/NotificationProxy.c src/lockdown.c
Diffstat (limited to 'udev')
-rw-r--r--udev/89-libiphone.rules.in5
-rw-r--r--udev/Makefile.am12
-rwxr-xr-xudev/set-usb-configuration-3.sh3
3 files changed, 20 insertions, 0 deletions
diff --git a/udev/89-libiphone.rules.in b/udev/89-libiphone.rules.in
new file mode 100644
index 0000000..48e9a16
--- /dev/null
+++ b/udev/89-libiphone.rules.in
@@ -0,0 +1,5 @@
+# Forces iPhone 1.0, 3G and iPodTouch 1 and 2 to USB configuration 3
+KERNEL=="?-?", ATTRS{idVendor}=="05ac", ATTRS{idProduct}=="1290", ACTION=="add", RUN+="@bindir@/set-usb-configuration-3.sh"
+KERNEL=="?-?", ATTRS{idVendor}=="05ac", ATTRS{idProduct}=="1291", ACTION=="add", RUN+="@bindir@/set-usb-configuration-3.sh"
+KERNEL=="?-?", ATTRS{idVendor}=="05ac", ATTRS{idProduct}=="1292", ACTION=="add", RUN+="@bindir@/set-usb-configuration-3.sh"
+KERNEL=="?-?", ATTRS{idVendor}=="05ac", ATTRS{idProduct}=="1293", ACTION=="add", RUN+="@bindir@/set-usb-configuration-3.sh"
diff --git a/udev/Makefile.am b/udev/Makefile.am
new file mode 100644
index 0000000..27cc456
--- /dev/null
+++ b/udev/Makefile.am
@@ -0,0 +1,12 @@
+udevdir=$(sysconfdir)/udev/rules.d/
+udev_DATA=89-libiphone.rules
+
+edit = sed \
+ -e 's|@bindir[@]|$(bindir)|g'
+
+89-libiphone.rules:
+ rm -f $@ $@.tmp
+ $(edit) '$(srcdir)/$@.in' >$@.tmp
+ mv $@.tmp $@
+
+bin_SCRIPTS = set-usb-configuration-3.sh
diff --git a/udev/set-usb-configuration-3.sh b/udev/set-usb-configuration-3.sh
new file mode 100755
index 0000000..ace07f0
--- /dev/null
+++ b/udev/set-usb-configuration-3.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+echo 3 > /sys$DEVPATH/bConfigurationValue