span_types: Fix bug that would prevent matching on devpath.
[dahdi/tools.git] / dahdi.rules
1
2 ACTION!="add",  GOTO="dahdi_add_end"
3
4 # DAHDI devices with ownership/permissions for running as non-root
5 SUBSYSTEM=="dahdi",             OWNER="asterisk", GROUP="asterisk", MODE="0660"
6
7 # Backward compat names: /dev/dahdi/<channo>
8 SUBSYSTEM=="dahdi_channels",    SYMLINK+="dahdi/%m"
9
10 # Add persistant names as well
11 SUBSYSTEM=="dahdi_channels", SYSFS{hardware_id}!="",    SYMLINK+="dahdi/devices/%s{hardware_id}/%s{local_spanno}/%n"
12 SUBSYSTEM=="dahdi_channels", SYSFS{location}!="",       SYMLINK+="dahdi/devices/@%s{location}/%s{local_spanno}/%n"
13
14 LABEL="dahdi_add_end"
15
16 # hotplug scripts
17 SUBSYSTEM=="dahdi_devices",     RUN="%E{DAHDI_TOOLS_ROOTDIR}/usr/share/dahdi/handle_device"
18 SUBSYSTEM=="dahdi_spans",       RUN="%E{DAHDI_TOOLS_ROOTDIR}/usr/share/dahdi/span_config"