dahdi.rules: add persistent channel names as well
authorOron Peled <oron.peled@xorcom.com>
Mon, 21 Oct 2013 15:04:39 +0000 (18:04 +0300)
committerTzafrir Cohen <tzafrir.cohen@xorcom.com>
Sun, 24 Nov 2013 14:39:33 +0000 (16:39 +0200)
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
Acked-by: Russ Meyerriecks <rmeyerriecks@digium.com>

dahdi.rules

index 392a751..e2a629f 100644 (file)
@@ -7,6 +7,10 @@ SUBSYSTEM=="dahdi",            OWNER="asterisk", GROUP="asterisk", MODE="0660"
 # Backward compat names: /dev/dahdi/<channo>
 SUBSYSTEM=="dahdi_channels",   SYMLINK+="dahdi/%m"
 
+# Add persistant names as well
+SUBSYSTEM=="dahdi_channels", SYSFS{hardware_id}!="",   SYMLINK+="dahdi/devices/%s{hardware_id}/%s{local_spanno}/%n"
+SUBSYSTEM=="dahdi_channels", SYSFS{location}!="",      SYMLINK+="dahdi/devices/@%s{location}/%s{local_spanno}/%n"
+
 LABEL="dahdi_add_end"
 
 # hotplug scripts