summaryrefslogtreecommitdiff
path: root/xpp
diff options
context:
space:
mode:
authortzafrir <tzafrir@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2006-11-11 14:38:49 +0000
committertzafrir <tzafrir@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2006-11-11 14:38:49 +0000
commit87bc7441b414f9e358fc6b1747932b24bbbd0178 (patch)
treefeaaadb79ae7249c725206ef8a81d82e5cb81223 /xpp
parentd7f98e33ac586ba7cffa92dd65f69904df111442 (diff)
r9497@boole (orig r1590): tzafrir | 2006-11-11 16:34:45 +0200
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/trunk@1591 5390a7c7-147a-4af0-8ec9-7488f05a26cb
Diffstat (limited to 'xpp')
-rwxr-xr-xxpp/init_card_3_239
-rwxr-xr-xxpp/init_card_4_236
2 files changed, 12 insertions, 3 deletions
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