auto_assign_spans may be true even if not '1'
auto_assign_spans is an int and may have legal values other than 1. It is legal (though pointless) to use: modprobe dahdi auto_assign_spans=3. Any value != 0 is true. Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com> Acked-by: Russ Meyerriecks <rmeyerriecks@digium.com>
This commit is contained in:
parent
27d07446ef
commit
dd752529f0
@ -68,7 +68,7 @@ add)
|
||||
echo "Old driver (no auto_assign_spans parameter). Skip $DEVPATH" | $LOGGER
|
||||
exit 0
|
||||
fi
|
||||
if [ `cat /sys/module/dahdi/parameters/auto_assign_spans` -eq 1 ]; then
|
||||
if [ `cat /sys/module/dahdi/parameters/auto_assign_spans` -ne 0 ]; then
|
||||
echo "auto_assign_spans=1. Skip $DEVPATH" | $LOGGER
|
||||
exit 0
|
||||
fi
|
||||
|
@ -71,7 +71,7 @@ add)
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ $(cat /sys/module/dahdi/parameters/auto_assign_spans) -eq 1 ]; then
|
||||
if [ $(cat /sys/module/dahdi/parameters/auto_assign_spans) -ne 0 ]; then
|
||||
$LOGGER "auto_assign_spans=1. Skip $DEVPATH"
|
||||
exit 0
|
||||
fi
|
||||
|
@ -35,7 +35,7 @@ my %opts;
|
||||
getopts('vRs:', \%opts) || usage;
|
||||
|
||||
my $dahdi_autoreg = check_param('/sys/module/xpp/parameters/dahdi_autoreg') eq 'Y';
|
||||
my $auto_assign_spans = check_param('/sys/module/dahdi/parameters/auto_assign_spans') eq '1';
|
||||
my $auto_assign_spans = check_param('/sys/module/dahdi/parameters/auto_assign_spans') ne '0';
|
||||
my $assigned_spans_config = $ENV{'ASSIGNED_SPANS_CONF_FILE'} || '/etc/dahdi/assigned-spans.conf';
|
||||
my $span_types_config = $ENV{'SPAN_TYPES_CONF_FILE'} || '/etc/dahdi/span-types.conf';
|
||||
my $have_assigned_spans_config = -f $assigned_spans_config || 0;
|
||||
|
Loading…
Reference in New Issue
Block a user