/etc/one-context.d/99-start-script is in opennebula-context 4.14.0-1.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | #!/bin/bash
MOUNT_DIR=/mnt
TMP_DIR=/tmp/one-context-tmp
TMP_FILE=$TMP_DIR/one-start-script
START_SCRIPT_AVAILABLE=no
mkdir -p $TMP_DIR
if [ -n "$START_SCRIPT_BASE64" ]; then
echo -en "$START_SCRIPT_BASE64" | openssl enc -d -base64 -A > $TMP_FILE
START_SCRIPT_AVAILABLE=yes
elif [ -n "$START_SCRIPT" ]; then
echo -en "$START_SCRIPT" > $TMP_FILE
START_SCRIPT_AVAILABLE=yes
fi
if [ "$START_SCRIPT_AVAILABLE" = "yes" ]; then
cd $MOUNT_DIR
chmod +x $TMP_FILE
$TMP_FILE
fi
|