[zaptel-commits] tzafrir: branch 1.2 r4452 - /branches/1.2/xpp/utils/xpp_fxloader

SVN commits to the Zaptel project zaptel-commits at lists.digium.com
Mon Aug 4 10:36:20 CDT 2008


Author: tzafrir
Date: Mon Aug  4 10:36:19 2008
New Revision: 4452

URL: http://svn.digium.com/view/zaptel?view=rev&rev=4452
Log:
Make it formally bashism.

Modified:
    branches/1.2/xpp/utils/xpp_fxloader

Modified: branches/1.2/xpp/utils/xpp_fxloader
URL: http://svn.digium.com/view/zaptel/branches/1.2/xpp/utils/xpp_fxloader?view=diff&rev=4452&r1=4451&r2=4452
==============================================================================
--- branches/1.2/xpp/utils/xpp_fxloader (original)
+++ branches/1.2/xpp/utils/xpp_fxloader Mon Aug  4 10:36:19 2008
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 
 # xpp_fxloader: load Xorcom Astribank (XPP) firmware
 #
@@ -55,8 +55,6 @@
 me=`basename $0`
 DEBIAN_DEFAULTS="/etc/default/zaptel"
 REDHAT_DEFAULTS="/etc/sysconfig/zaptel"
-
-status_fd=3
 
 if [ -r "$DEBIAN_DEFAULTS" -a -r "$REDHAT_DEFAULTS" ]; then
 	echo 1>&2 "$0: Both '$DEBIAN_DEFAULTS' and '$REDHAT_DEFAULTS' exist"
@@ -145,12 +143,9 @@
 
 	$LOGGER "FPGA Firmware into $dev"
 	sleep_if_race
-	(
-		$FPGA_LOAD -D "$dev" -I "$FIRMWARE_DIR/$fw" -i
-		echo $? >$status_fd
-	)>| $LOGGER
-	status=`cat <$status_fd`
-	if [ "$status" != 0 ]; then
+	$FPGA_LOAD -D "$dev" -I "$FIRMWARE_DIR/$fw" -i | $LOGGER
+	status=$PIPESTATUS
+	if [ $status != 0 ]; then
 		echo "fpga_load failed with status $status" | $LOGGER
 		exit 77
 	fi




More information about the zaptel-commits mailing list