diff options
author | Shaun Ruffell <sruffell@digium.com> | 2011-01-21 05:29:09 +0000 |
---|---|---|
committer | Shaun Ruffell <sruffell@digium.com> | 2011-01-21 05:29:09 +0000 |
commit | 36b2f54e5cf257ad96f551e6900fef88beb9423e (patch) | |
tree | 0bbfc102f6634e6c27659fc1bf411fef31b8d429 | |
parent | aabcb55d8259b196403fc1acf100eda3a6fffbbf (diff) |
xpp: Fixes init error for PRI devices with < 4 ports
Fixes a regression singce r8873: if pri_protocol is not explicitly set
(in /etc/dahdi/xpp.conf) and the device has (licences for) less than 4
"PRI" (E1/T1) ports, the initialization script will attempt to read from
a non-existing SysFS file, and bail out, resulting in a the device
failing to initialize.
For those non-existing ports we can just skip that part of the
initialization. So we just skip it.
Work around: explicitly set pri_protocol to E1 or T1, as needed.
Xorcom Rev: 8047. Ticket: 1334.
Origin: http://svnview.digium.com/svn/dahdi?view=rev&rev=9430
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/branches/2.4@9666 a0bf4364-ded3-4de4-8d8a-66a801d63aff
-rwxr-xr-x | drivers/dahdi/xpp/init_card_4_30 | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/dahdi/xpp/init_card_4_30 b/drivers/dahdi/xpp/init_card_4_30 index e417196..2f0a79d 100755 --- a/drivers/dahdi/xpp/init_card_4_30 +++ b/drivers/dahdi/xpp/init_card_4_30 @@ -348,7 +348,7 @@ sub port_setup($) { } else { my $file = sprintf "/sys/bus/xpds/devices/%02d:%1d:%1d/pri_protocol", $ENV{XBUS_NUMBER}, $ENV{UNIT_NUMBER}, $portno; - open(F, $file) || die "$0: Failed opening '$file'"; + open(F, $file) || return; $sysfs_pri_protocol = <F>; close F; chomp $sysfs_pri_protocol; |