diff options
author | Tzafrir Cohen <tzafrir.cohen@xorcom.com> | 2008-06-25 10:01:11 +0000 |
---|---|---|
committer | Tzafrir Cohen <tzafrir.cohen@xorcom.com> | 2008-06-25 10:01:11 +0000 |
commit | f543cf5b0c9cbe3053ee445f6f9b2f3506a2e949 (patch) | |
tree | 9dad753ececa54c19681f6da369da6264c2f4261 | |
parent | 5d43e446fe362574ad89b95599411ea4f0fa3192 (diff) |
* Rename Dahdi::Config::Defaults to Dahdi::Config::GenconfDefaults .
* Reads from the new /etc/dahdi/genconf_parameters .
* Do installl xpp_fxloader (the firmware loading wrapper script).
* Even more /etc/dahdi/system.conf string fixes.
git-svn-id: http://svn.asterisk.org/svn/dahdi/tools/trunk@4463 a0bf4364-ded3-4de4-8d8a-66a801d63aff
-rw-r--r-- | xpp/Makefile | 1 | ||||
-rwxr-xr-x | xpp/dahdi_genconf | 8 | ||||
-rw-r--r-- | xpp/genconf_parameters | 21 | ||||
-rw-r--r-- | xpp/perl_modules/Dahdi/Chans.pm | 2 | ||||
-rw-r--r-- | xpp/perl_modules/Dahdi/Config/GenconfDefaults.pm (renamed from xpp/perl_modules/Dahdi/Config/Defaults.pm) | 26 | ||||
-rw-r--r-- | xpp/perl_modules/Dahdi/Span.pm | 2 |
6 files changed, 32 insertions, 28 deletions
diff --git a/xpp/Makefile b/xpp/Makefile index c104c52..d15ea97 100644 --- a/xpp/Makefile +++ b/xpp/Makefile @@ -75,6 +75,7 @@ install: all $(INSTALL) -d $(DESTDIR)$(SBINDIR) $(INSTALL) $(PROG_INSTALL) $(DESTDIR)$(SBINDIR)/ $(INSTALL) -d $(DESTDIR)$(DATADIR) + $(INSTALL) xpp_fxloader $(DESTDIR)$(DATADIR)/ $(INSTALL) -d $(DESTDIR)$(MANDIR) $(INSTALL_DATA) $(MAN_INSTALL) $(DESTDIR)$(MANDIR)/ $(INSTALL) -d $(DESTDIR)$(HOTPLUG_USB_DIR) diff --git a/xpp/dahdi_genconf b/xpp/dahdi_genconf index 83fd0d4..378e8a9 100755 --- a/xpp/dahdi_genconf +++ b/xpp/dahdi_genconf @@ -13,7 +13,7 @@ BEGIN { my $dir = dirname($0); unshift(@INC, "$dir", "$dir/perl_modules"); } use Dahdi; use Dahdi::Xpp; -use Dahdi::Config::Defaults; +use Dahdi::Config::GenconfDefaults; my %default_context = ( FXO => 'from-pstn', @@ -531,13 +531,13 @@ sub gen_chan_dahdi_conf($) { sub set_defaults { # Source default files my ($default_file, %source_defaults) = - Dahdi::Config::Defaults::source_vars(keys(%dahdi_default_vars)); + Dahdi::Config::GenconfDefaults::source_vars(keys(%dahdi_default_vars)); map_dahdi_defaults(%source_defaults); # Fixups foreach my $val (values %default_dahdi_signalling, values %default_chan_dahdi_signalling) { $val =~ s/{fxs_default_start}/$fxs_default_start/g; } - $dahdiconf_file = $ENV{DAHDI_CONF_FILE} || "/etc/dahdi.conf"; + $dahdiconf_file = $ENV{DAHDI_CONF_FILE} || "/etc/dahdi/system.conf"; $chan_dahdi_channels_file = $ENV{CHAN_DAHDI_CHANNELS_FILE} || "/etc/asterisk/dahdi-channels.conf"; $users_file = $ENV{USERS_FILE} || "/etc/asterisk/users.conf"; $chan_dahdi_conf_file = $ENV{CHAN_DAHDI_CONF_FILE} || "/etc/asterisk/chan_dahdi.conf"; @@ -579,7 +579,7 @@ Without arguments, it generates only dahdi and chan_dahdi. =over 4 -=item dahdi - /etc/dahdi.conf +=item dahdi - /etc/dahdi/system.conf Configuration for ztcfg(1). It's location may be overriden by the environment variable DAHDI_CONF_FILE. diff --git a/xpp/genconf_parameters b/xpp/genconf_parameters new file mode 100644 index 0000000..56d4fb2 --- /dev/null +++ b/xpp/genconf_parameters @@ -0,0 +1,21 @@ +# +# /etc/dahdi/genconf_parameters +# +# This file contains parameters that affect the +# dahdi_genconf configurator generator. +# +base_exten=4000 +fxs_immediate=no +fxs_default_start=ks +lc_country=il + +#context_lines= +#context_phones= +#context_input= +#context_output= + +#group_phones= +#group_lines= + +#brint_overlap= +bri_sig_style=bri_ptmp diff --git a/xpp/perl_modules/Dahdi/Chans.pm b/xpp/perl_modules/Dahdi/Chans.pm index adb7975..470893b 100644 --- a/xpp/perl_modules/Dahdi/Chans.pm +++ b/xpp/perl_modules/Dahdi/Chans.pm @@ -40,7 +40,7 @@ Returns the number of this channel as a Dahdi channel. =head signalling() -Returns the signalling set for this channel through /etc/dahdi.conf . +Returns the signalling set for this channel through /etc/dahdi/system.conf . This is always empty before dahdi_cfg was run. And shows the "other" type for FXS and for FXO. diff --git a/xpp/perl_modules/Dahdi/Config/Defaults.pm b/xpp/perl_modules/Dahdi/Config/GenconfDefaults.pm index e720568..9988929 100644 --- a/xpp/perl_modules/Dahdi/Config/Defaults.pm +++ b/xpp/perl_modules/Dahdi/Config/GenconfDefaults.pm @@ -1,4 +1,4 @@ -package Dahdi::Config::Defaults; +package Dahdi::Config::GenconfDefaults; # # Written by Oron Peled <oron@actcom.co.il> # Copyright (C) 2007, Xorcom @@ -28,29 +28,11 @@ sub do_source($@) { sub source_vars { my @vars = @_; - my $default_file; - my %system_files = ( - "/etc/default/zaptel" => 'Debian and friends', - "/etc/sysconfig/zaptel" => 'Red Hat and friends', - "/etc/dahdi/defaults" => 'Dahdi generic', - ); - - if(defined $ENV{DAHDI_DEFAULTS}) { - $default_file = $ENV{DAHDI_DEFAULTS}; - } else { - foreach my $f (keys %system_files) { - if(-r $f) { - if(defined $default_file) { - die "An '$f' collides with '$default_file'"; - } - $default_file = $f; - } - } - } - if (! $default_file) { + my $default_file = $ENV{GENCONF_PARAMETERS} || "/etc/dahdi/genconf_parameters"; + if (! -r $default_file) { return ("", ()); } - my %vars = Dahdi::Config::Defaults::do_source($default_file, @vars); + my %vars = do_source($default_file, @vars); return ($default_file, %vars); } diff --git a/xpp/perl_modules/Dahdi/Span.pm b/xpp/perl_modules/Dahdi/Span.pm index e8faa9b..a196ce2 100644 --- a/xpp/perl_modules/Dahdi/Span.pm +++ b/xpp/perl_modules/Dahdi/Span.pm @@ -95,7 +95,7 @@ Suggested sane framing type (e.g.: "ccs", "esf") for this type of span. =head2 yellow(), crc4() Likewise, suggestions ofr the respective fields in the span= line in -dahdi.conf for this span. +/etc/dahdi/system.conf for this span. =head2 signalling() |