summaryrefslogtreecommitdiff
path: root/xpp/xpp_fxloader
diff options
context:
space:
mode:
authorTzafrir Cohen <tzafrir.cohen@xorcom.com>2008-07-10 17:31:30 +0000
committerTzafrir Cohen <tzafrir.cohen@xorcom.com>2008-07-10 17:31:30 +0000
commit20b4972e6250f1657816bc338a156987ae840938 (patch)
tree237bcc0fe09e343af5f884180d8d77537fa9da35 /xpp/xpp_fxloader
parent29ed9a8c37cd173af69cb6adca4b397ab31ffb80 (diff)
Well, make this a bashism formally.
git-svn-id: http://svn.asterisk.org/svn/dahdi/tools/trunk@4600 a0bf4364-ded3-4de4-8d8a-66a801d63aff
Diffstat (limited to 'xpp/xpp_fxloader')
-rw-r--r--xpp/xpp_fxloader12
1 files changed, 3 insertions, 9 deletions
diff --git a/xpp/xpp_fxloader b/xpp/xpp_fxloader
index 2c56539..240eeae 100644
--- a/xpp/xpp_fxloader
+++ b/xpp/xpp_fxloader
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# xpp_fxloader: load Xorcom Astribank (XPP) firmware
#
@@ -54,7 +54,6 @@ export PATH
me=`basename $0`
DEFAULTS="/etc/dahdi/init.conf"
-status_fd=3
if [ -t 2 ]; then
LOGGER="logger -i -t '$me' -s"
@@ -68,8 +67,6 @@ USB_PREFIX=
XPP_FIRMWARE_DIR="${XPP_FIRMWARE_DIR:-/usr/share/dahdi}"
-FIRM_FXS=$XPP_FIRMWARE_DIR/FPGA_FXS.hex
-
FPGA_LOAD=${FPGA_LOAD:-/usr/sbin/fpga_load}
USB_FW="${USB_FW:-USB_FW.hex}"
@@ -134,11 +131,8 @@ load_fpga() {
$LOGGER "FPGA Firmware into $dev"
sleep_if_race
- (
- $FPGA_LOAD -D "$dev" -I "$XPP_FIRMWARE_DIR/$fw" -i
- echo $? >$status_fd
- ) | $LOGGER
- status=`cat <$status_fd`
+ $FPGA_LOAD -D "$dev" -I "$XPP_FIRMWARE_DIR/$fw" -i | $LOGGER
+ status=$PIPESTATUS
if [ "$status" != 0 ]; then
echo "fpga_load failed with status $status" | $LOGGER
exit 77