[svn-commits] tzafrir: tools/trunk r4600 - /tools/trunk/xpp/xpp_fxloader

SVN commits to the Digium repositories svn-commits at lists.digium.com
Thu Jul 10 12:31:31 CDT 2008


Author: tzafrir
Date: Thu Jul 10 12:31:30 2008
New Revision: 4600

URL: http://svn.digium.com/view/dahdi?view=rev&rev=4600
Log:
Well, make this a bashism formally.

Modified:
    tools/trunk/xpp/xpp_fxloader

Modified: tools/trunk/xpp/xpp_fxloader
URL: http://svn.digium.com/view/dahdi/tools/trunk/xpp/xpp_fxloader?view=diff&rev=4600&r1=4599&r2=4600
==============================================================================
--- tools/trunk/xpp/xpp_fxloader (original)
+++ tools/trunk/xpp/xpp_fxloader Thu Jul 10 12:31:30 2008
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 
 # xpp_fxloader: load Xorcom Astribank (XPP) firmware
 #
@@ -54,7 +54,6 @@
 
 me=`basename $0`
 DEFAULTS="/etc/dahdi/init.conf"
-status_fd=3
 
 if [ -t 2 ]; then
 	LOGGER="logger -i -t '$me' -s"
@@ -67,8 +66,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 @@
 
 	$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




More information about the svn-commits mailing list