[asterisk-dev] Fwd: [asterisk-commits] tzafrir: trunk r417863 - in /trunk: ./ contrib/scripts/

Corey Farrell git at cfware.com
Fri Jul 4 14:59:29 CDT 2014


This change causes non-root install to fail:
/usr/bin/install -c -d //usr/share/dahdi/span_config.d
/usr/bin/install: cannot create directory ‘//usr/share/dahdi’: Permission denied

Note I do not have DAHDI on this system.  Maybe this should only
install if chan_dahdi is enabled?  Even with chan_dahdi enabled we
should not break non-root builds (./configure
--prefix=${HOME}/somelocaldir).


---------- Forwarded message ----------
From: SVN commits to the Asterisk project <asterisk-commits at lists.digium.com>
Date: Thu, Jul 3, 2014 at 10:08 AM
Subject: [asterisk-commits] tzafrir: trunk r417863 - in /trunk: ./
contrib/scripts/
To: asterisk-commits at lists.digium.com, svn-commits at lists.digium.com


Author: tzafrir
Date: Thu Jul  3 09:08:02 2014
New Revision: 417863

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=417863
Log:
dahdi_span_config_hook: automatically register new dahdi channels

Install a hook script for DAHDI to register new spans with Asterisk
automatically by running:

  asterisk -rx 'dahdi create channel FIRST LAST'

Review: https://reviewboard.asterisk.org/r/3157/

Added:
    trunk/contrib/scripts/dahdi_span_config_hook   (with props)
Modified:
    trunk/Makefile

Modified: trunk/Makefile
URL: http://svnview.digium.com/svn/asterisk/trunk/Makefile?view=diff&rev=417863&r1=417862&r2=417863
==============================================================================
--- trunk/Makefile (original)
+++ trunk/Makefile Thu Jul  3 09:08:02 2014
@@ -156,6 +156,8 @@
 # a new version of Asterisk, you don't have to run menuselect to set them.
 # The file /etc/asterisk.makeopts will also be included but can be overridden
 # by the file in your home directory.
+
+DAHDI_UDEV_HOOK_DIR = /usr/share/dahdi/span_config.d

 GLOBAL_MAKEOPTS=$(wildcard /etc/asterisk.makeopts)
 USER_MAKEOPTS=$(wildcard ~/.asterisk.makeopts)
@@ -589,6 +591,8 @@
        if [ -f contrib/firmware/iax/iaxy.bin ] ; then \
                $(INSTALL) -m 644 contrib/firmware/iax/iaxy.bin
"$(DESTDIR)$(ASTDATADIR)/firmware/iax/iaxy.bin"; \
        fi
+       $(INSTALL) -d $(DESTDIR)/$(DAHDI_UDEV_HOOK_DIR)
+       $(INSTALL) -m 644 contrib/scripts/dahdi_span_config_hook
$(DESTDIR)$(DAHDI_UDEV_HOOK_DIR)/40-asterisk

 $(SUBDIRS_INSTALL):
        + at DESTDIR="$(DESTDIR)" ASTSBINDIR="$(ASTSBINDIR)" $(SUBMAKE)
-C $(@:-install=) install

Added: trunk/contrib/scripts/dahdi_span_config_hook
URL: http://svnview.digium.com/svn/asterisk/trunk/contrib/scripts/dahdi_span_config_hook?view=auto&rev=417863
==============================================================================
--- trunk/contrib/scripts/dahdi_span_config_hook (added)
+++ trunk/contrib/scripts/dahdi_span_config_hook Thu Jul  3 09:08:02 2014
@@ -1,0 +1,32 @@
+#! /bin/sh
+
+# This script is intended to be called from
+# /usr/share/dahdi/dahdi_span_config, which is is typically called from
+# a udev hook script.
+#
+# Environment is set in
+# http://git.asterisk.org/gitweb/?p=dahdi/tools.git;a=blob;f=hotplug/dahdi_span_config
+
+if [ "$ACTION" != 'add' ]; then
+       # Nothing to do here
+       exit 0
+fi
+
+# Add to asterisk
+asterisk -rx "dahdi create channels $BASECHAN $ENDCHAN"
+#! /bin/sh
+
+# This script is intended to be called from
+# /usr/share/dahdi/dahdi_span_config, which is is typically called from
+# a udev hook script.
+#
+# Environment is set in
+# http://git.asterisk.org/gitweb/?p=dahdi/tools.git;a=blob;f=hotplug/dahdi_span_config
+
+if [ "$ACTION" != 'add' ]; then
+       # Nothing to do here
+       exit 0
+fi
+
+# Add to asterisk
+asterisk -rx "dahdi create channels $BASECHAN $ENDCHAN"

Propchange: trunk/contrib/scripts/dahdi_span_config_hook
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: trunk/contrib/scripts/dahdi_span_config_hook
------------------------------------------------------------------------------
    svn:executable = *

Propchange: trunk/contrib/scripts/dahdi_span_config_hook
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: trunk/contrib/scripts/dahdi_span_config_hook
------------------------------------------------------------------------------
    svn:mime-type = text/plain


--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-commits mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-commits



More information about the asterisk-dev mailing list