summaryrefslogtreecommitdiff
path: root/scripts/build/debug/200-duma.sh
diff options
context:
space:
mode:
authorYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2008-06-30 20:37:14 (GMT)
committerYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2008-06-30 20:37:14 (GMT)
commit08ca782e76bae04823eb7d52b8cff2adb664d33e (patch)
tree1e788385709b3674eee7613d020a3026cefbfdd8 /scripts/build/debug/200-duma.sh
parent15483af16b822680b39053302a78c4c1b6f4016f (diff)
Newer, better, tsocks(1)-like wrapper script for D.U.M.A.
/trunk/scripts/build/debug/duma.in | 44 44 0 0 ++++++++++++++++++++++++++++++++++++++++ /trunk/scripts/build/debug/200-duma.sh | 12 3 9 0 +++-------- 2 files changed, 47 insertions(+), 9 deletions(-)
Diffstat (limited to 'scripts/build/debug/200-duma.sh')
-rw-r--r--scripts/build/debug/200-duma.sh12
1 files changed, 3 insertions, 9 deletions
diff --git a/scripts/build/debug/200-duma.sh b/scripts/build/debug/200-duma.sh
index 1375eda..e199796 100644
--- a/scripts/build/debug/200-duma.sh
+++ b/scripts/build/debug/200-duma.sh
@@ -58,15 +58,9 @@ do_debug_duma_build() {
CT_DoLog EXTRA "Installing wrapper script"
mkdir -p "${CT_DEBUG_INSTALL_DIR}/usr/bin"
# Install a simpler, smaller, safer wrapper than the one provided by D.U.M.A.
- cat >"${CT_DEBUG_INSTALL_DIR}/usr/bin/duma" <<_EOF_
-#!/bin/sh
-if [ \$# -eq 0 ]; then
- echo "Usage: \$0 <executable [args]>"
- exit 1
-fi
-export LD_PRELOAD="${duma_so}"
-exec "\$@"
-_EOF_
+ sed -r -e 's:^LIBDUMA_SO=.*:LIBDUMA_SO=/usr/lib/'"${duma_so}"':;' \
+ "${CT_LIB_DIR}/scripts/build/debug/duma.in" \
+ >"${CT_DEBUG_INSTALL_DIR}/usr/bin/duma"
chmod 755 "${CT_DEBUG_INSTALL_DIR}/usr/bin/duma"
fi