pinned-spans: fix configuration file names

* Install them as *.conf.sample -- that's what they are
* Correctly rename spantype.conf to span-types.conf (new name)

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
Acked-by: Russ Meyerriecks <rmeyerriecks@digium.com>
pinned-spans: fix examples in configuration files

* Correctly use the new "location" attribute
* Document the possibility to match against sysfs devpath
  (used to be the "location")

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
Acked-by: Russ Meyerriecks <rmeyerriecks@digium.com>
pinned-spans: remove '--enable-pinned' from configure

pinned-spans utilities are now essential:
* Called by udev rules
* Called by dahdi_genconf

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
Acked-by: Russ Meyerriecks <rmeyerriecks@digium.com>
added udev rules and their install target:

* Added missing Makefile install rule for dahdi.rules
* Pulled xpp.rules from dahdi-linux and added install rules for it

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
Acked-by: Russ Meyerriecks <rmeyerriecks@digium.com>
sysfs: restored legacy names /etc/dahdi/<channo>:

Update dahdi.rules to create again the old fashioned device files
(/dev/dahdi/<channo>), but as symlinks to modern names.

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
Acked-by: Russ Meyerriecks <rmeyerriecks@digium.com>
udev scripts now read /etc/dahdi/init.conf

Added two override variables in init.conf:
* DAHDI_UDEV_DISABLE_DEVICES
* DAHDI_UDEV_DISABLE_SPANS

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
Acked-by: Russ Meyerriecks <rmeyerriecks@digium.com>
span_types: fix for white-space in hardware_id

* Sanitize hardware_id/location attributes, just like span_assignments
* Allow control of keys via SPAN_ASSIGNMENTS_KEY or '-k <key>' option
* In general, import most features/options from span_assignments

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
Acked-by: Russ Meyerriecks <rmeyerriecks@digium.com>
dahdi.rules: use tools_rootdir from driver

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
Acked-by: Russ Meyerriecks <rmeyerriecks@digium.com>
fxotune: Now options '-b/-e' also apply with '-s'

* Now we can limit fxotune "set" mode to specific channel range.

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
Acked-by: Russ Meyerriecks <rmeyerriecks@digium.com>
hotplug: run fxotune from span_config:

* Use fxotune -b/-e options to run on wanted channel range
dahdi.rules: don't process "add" events unless needed

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
Acked-by: Russ Meyerriecks <rmeyerriecks@digium.com>
dahdi.rules: add persistent channel names as well

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
Acked-by: Russ Meyerriecks <rmeyerriecks@digium.com>
Terminology rename: "pinned" -> "assigned"

* File names fixed
* File contents fixed

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
Acked-by: Russ Meyerriecks <rmeyerriecks@digium.com>
README: include pinned spans config files

Include pinned-spans.conf and span-types.conf in the generated
README.html. Reformat them to render properly.

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
dahdi.init: Remove spurious "Missing '/sys/bus/astribanks/drivers/xppdrv/sync'".

The xpp_sync will fail if there are not any Astribank devices loaded. Check for
existence of the tools before trying to sync.

Signed-off-by: Shaun Ruffell <sruffell@digium.com>
Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
configure: regenerate for 6d10525

Regenerate configure script following changes in commit
6d10525863d91335cd09b0400ddfb85433e107ed.

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
span_types: Fix bug that would prevent matching on devpath.

If a configuration file was specified that used the devpath, like:

  # Device: [] @Board_ID_Switch_0 /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/0000:02:08.0/pci:0000:02:08.0
  /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/0000:02:08.0/pci:0000:02:08.0 1:E1
  /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/0000:02:08.0/pci:0000:02:08.0 2:E1
  /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/0000:02:08.0/pci:0000:02:08.0 3:E1
  /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/0000:02:08.0/pci:0000:02:08.0 4:E1

Then the span_types script would silently fail to match the configuration lines
for the device and silently fail to change the linemodes.

Signed-off-by: Shaun Ruffell <sruffell@digium.com>
Acked-by: Oron Peled <oron.peled@xorcom.com>
Add dahdi_ prefix to handle_device, span_types, span_assignments, and span_config.

All new dahdi tools and utilities will be prefixed with "dahdi_" in order to
avoid any future conflicts with other packages.

Signed-off-by: Shaun Ruffell <sruffell@digium.com>
Acked-by: Oron Peled <oron.peled@xorcom.com>
dahdi_span_assignments, dahdi_span_types: Allow conf file to be overridden.

The environment variables that specified the full path the the configuration
files for dahdi_span_types and dahdi_span_assignments was documented, but they
were not actually set from the environment.

Also, the case of the variable was changed to match the one for the directory
where the rest of the config files are located.

Signed-off-by: Shaun Ruffell <sruffell@digium.com>
Makefile: new 'make-dist' target

Creates a tar.gz:
* Identical results to Digium's distributed tarballs
* Named "dahdi-tools-<version>.tar.gz"
* Only from committed files (uses git-archive)
* Adds a .version file

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
Acked-by: Russ Meyerriecks <rmeyerriecks@digium.com>