summaryrefslogtreecommitdiff
path: root/dahdi_helper.py
diff options
context:
space:
mode:
authorShaun Ruffell <sruffell@digium.com>2011-02-22 11:38:49 -0600
committerShaun Ruffell <sruffell@digium.com>2011-04-15 14:21:13 -0500
commit9c8aa9db7eca1c91bd37bd5b55add0cee40d7cd9 (patch)
treebfc2085dcc4eab5646319c0b60cf7cf75f21e8f3 /dahdi_helper.py
parenta252159ad7fff13d9f136e72d82ed400c2cb62f8 (diff)
delete: adding dahdi_helper to inspect the uvents we want.
Diffstat (limited to 'dahdi_helper.py')
-rwxr-xr-xdahdi_helper.py28
1 files changed, 28 insertions, 0 deletions
diff --git a/dahdi_helper.py b/dahdi_helper.py
new file mode 100755
index 0000000..672f6fe
--- /dev/null
+++ b/dahdi_helper.py
@@ -0,0 +1,28 @@
+#!/usr/bin/python
+#
+# This is just a debugging aide.
+# Add:
+#
+# SUBSYSTEM=="dahdi_devices", RUN="/home/sruffell/dahdi_helper.py"
+#
+# to /etc/udev/rules.d/dahdi.rules in order to watch the events.
+
+import sys
+import os
+
+log = file("/home/sruffell/log.txt", "a")
+log.write("*" * 80 + "\n")
+log.write("ARGUMENTS: ")
+for arg in sys.argv:
+ log.write(arg + " ")
+
+log.write("\nENVIRONMENT:\n")
+
+keys = os.environ.keys()
+keys.sort()
+for key in keys:
+ log.write(key + " : " + os.environ[key] + "\n")
+
+# This will cause this device to automatically register all of it's spans.
+#filename = "/sys" + os.environ["DEVPATH"] + "/auto_register"
+#file(filename, "w").write("1\n")