Skip to content

Commit 0c14404

Browse files
committed
fix: further ampstart changes
1 parent 98b6d48 commit 0c14404

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

scripts/base/ampstart.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ touch /home/amp/.gitconfig
2525
chown -R amp:amp /home/amp 2>/dev/null
2626

2727
# Make AMP binary executable
28-
[ -f /AMP/AMP_Linux_${ARCH} ] && chmod +x /AMP/AMP_Linux_${ARCH}
28+
AMP_BIN="/AMP/AMP_Linux_${ARCH}"
29+
[ -f "${AMP_BIN}" ] && chmod +x "${AMP_BIN}"
2930

3031
# Install extra dependencies if needed
3132
REQUIRED_DEPS=()
@@ -61,11 +62,10 @@ fi
6162
# Handoff
6263
echo "[Info] Starting AMP..."
6364
exec su -l -s /bin/bash \
64-
-w AMPHOSTPLATFORM,AMP_CONTAINER,AMPMEMORYLIMIT,AMPSWAPLIMIT,AMPCONTAINERCPUS,AMP_CONTAINER_HOST_NETWORK,LANG,LANGUAGE,LC_ALL \
65+
-w AMPHOSTPLATFORM,AMP_CONTAINER,AMPMEMORYLIMIT,AMPSWAPLIMIT,AMPCONTAINERCPUS,AMP_CONTAINER_HOST_NETWORK,AMP_BIN,LANG,LANGUAGE,LC_ALL \
6566
amp -c '
66-
set -e
67+
/ampinstmgr --sync-certs
6768
cd /AMP
6869
export LD_LIBRARY_PATH="/opt/cubecoders/amp:/AMP"
69-
ampinstmgr --sync-certs
70-
exec "/AMP/AMP_Linux_'"${ARCH}"'" "$@"
70+
exec "${AMP_BIN}" "$@"
7171
' -- _ "$@"

0 commit comments

Comments
 (0)