diff options
author | Shaun Ruffell <sruffell@digium.com> | 2011-02-22 11:38:49 -0600 |
---|---|---|
committer | Shaun Ruffell <sruffell@digium.com> | 2011-04-15 14:21:13 -0500 |
commit | 9c8aa9db7eca1c91bd37bd5b55add0cee40d7cd9 (patch) | |
tree | bfc2085dcc4eab5646319c0b60cf7cf75f21e8f3 | |
parent | a252159ad7fff13d9f136e72d82ed400c2cb62f8 (diff) |
delete: adding dahdi_helper to inspect the uvents we want.
-rwxr-xr-x | build_tools/genudevrules | 1 | ||||
-rwxr-xr-x | dahdi_helper.py | 28 |
2 files changed, 29 insertions, 0 deletions
diff --git a/build_tools/genudevrules b/build_tools/genudevrules index cfd3c90..2a73c05 100755 --- a/build_tools/genudevrules +++ b/build_tools/genudevrules @@ -37,4 +37,5 @@ KERNEL${match}"dahdi[0-9]*", NAME="dahdi/%n" # DAHDI devices with ownership/permissions for running as non-root SUBSYSTEM${match}"dahdi", OWNER="asterisk", GROUP="asterisk", MODE="0660" +SUBSYSTEM${match}"dahdi_devices", RUN="/home/sruffell/dahdi-linux/dahdi_helper.py" EOF 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") |