diff --git a/base/usr/sbin/one-contextd b/base/usr/sbin/one-contextd index 716c94f..3b7b104 100755 --- a/base/usr/sbin/one-contextd +++ b/base/usr/sbin/one-contextd @@ -32,7 +32,7 @@ function export_rc_vars function execute_scripts { SCRIPTS_DIR="/etc/one-context.d" for script in $SCRIPTS_DIR/*; do - $script + "$script" "$1" done } @@ -45,18 +45,20 @@ function start { cp /mnt/context.sh /tmp/context.sh fi - execute_scripts + execute_scripts "$1" umount /mnt elif curl -o /tmp/context.sh http://169.254.169.254/latest/user-data ; then export_rc_vars /tmp/context.sh - execute_scripts + execute_scripts "$1" elif type vmtoolsd ; then vmtoolsd --cmd 'info-get guestinfo.opennebula.context' | \ openssl base64 -d > /tmp/context.sh export_rc_vars /tmp/context.sh - execute_scripts + execute_scripts "$1" fi } -start \ No newline at end of file +COMMAND="$1" + +start "$COMMAND"