From 9237dd399eb9262fb82258f2561982742f15c25d Mon Sep 17 00:00:00 2001 From: tzafrir Date: Sat, 11 Nov 2006 14:34:45 +0000 Subject: init_card[34]_23: merge from 2654,2655. * Redirect stderr to /dev/null. Without any redirection, it may fail with exitval=4 . Probably, fd 2 is closed and the shell (or sed which is used in the scripts) tries to write to it (or do some other I/O related syscall) which fails. * make XPP_BASE handling identical in the two scripts. git-svn-id: http://svn.digium.com/svn/zaptel/branches/1.4@1590 5390a7c7-147a-4af0-8ec9-7488f05a26cb --- xpp/init_card_3_23 | 9 +++++++-- xpp/init_card_4_23 | 6 +++++- 2 files changed, 12 insertions(+), 3 deletions(-) (limited to 'xpp') diff --git a/xpp/init_card_3_23 b/xpp/init_card_3_23 index f000ec8..5698484 100755 --- a/xpp/init_card_3_23 +++ b/xpp/init_card_3_23 @@ -42,12 +42,17 @@ set -e me=`basename $0` INIT_DIR=`dirname $0` -export XPP_BASE=/proc/xpp +XPP_BASE=/proc/xpp +export XPP_BASE LOGGER="logger -s -t $me" +# Always redirect stderr somewhere, otherwise the shell script will die +# when it tries to do I/O related stuff on closed file descriptor. +# Our default is to throw it down the bit-bucket. +exec 2> /dev/null ## If you wish to trace this script: #exec 2> /tmp/xpp_init_$XPD_NAME -## Altenativly, if you have multiple XPDs: +## Altenativly, if you have multiple XBUS'es: #exec 2> /tmp/xpp_init_$XBUS_NAME_$XPD_NAME #set -x diff --git a/xpp/init_card_4_23 b/xpp/init_card_4_23 index 76beaff..155a029 100755 --- a/xpp/init_card_4_23 +++ b/xpp/init_card_4_23 @@ -44,9 +44,13 @@ XPP_BASE=/proc/xpp export XPP_BASE LOGGER="logger -s -t $me" +# Always redirect stderr somewhere, otherwise the shell script will die +# when it tries to do I/O related stuff on closed file descriptor. +# Our default is to throw it down the bit-bucket. +exec 2> /dev/null ## If you wish to trace this script: #exec 2> /tmp/xpp_init_$XPD_NAME -## Altenativly, if you have multiple XPDs: +## Altenativly, if you have multiple XBUS'es: #exec 2> /tmp/xpp_init_$XBUS_NAME_$XPD_NAME #set -x -- cgit v1.2.3