summaryrefslogtreecommitdiffstats
path: root/data/hal-iphone-setup
diff options
context:
space:
mode:
authorGravatar Matt Colyer2008-10-07 09:32:28 -0700
committerGravatar Matt Colyer2008-10-07 09:32:28 -0700
commit12b128bcdb67f7427c1e216ec6f42c45281bfccf (patch)
tree2cf4ddd9dac4a2fc87c728a93cbe34c34dc3040c /data/hal-iphone-setup
downloadifuse-12b128bcdb67f7427c1e216ec6f42c45281bfccf.tar.gz
ifuse-12b128bcdb67f7427c1e216ec6f42c45281bfccf.tar.bz2
Initial commit.
Diffstat (limited to 'data/hal-iphone-setup')
-rwxr-xr-xdata/hal-iphone-setup22
1 files changed, 22 insertions, 0 deletions
diff --git a/data/hal-iphone-setup b/data/hal-iphone-setup
new file mode 100755
index 0000000..a6cffe6
--- /dev/null
+++ b/data/hal-iphone-setup
@@ -0,0 +1,22 @@
+#!/bin/sh
+#
+# borrowed from Fedora and modified to apply device major and minor nodes to the iPhone
+#
+
+hal_set () {
+ if [ -n "$2" ]; then
+ /usr/bin/hal-set-property --udi "$UDI" --key block.$1 --int "$2"
+ else
+ /usr/bin/hal-set-property --udi "$UDI" --key block.$1 --remove
+ fi
+}
+
+DEVICE_NODE=`hal-get-property --udi "$UDI" --key block.device`
+
+echo $DEVICE_NODE
+
+MAJOR=`stat $DEVICE_NODE --format="%t"`
+MINOR=`stat $DEVICE_NODE --format="%T"`
+
+hal_set major 0x$MAJOR
+hal_set minor 0x$MINOR