mirror of
https://github.com/OpenNebula/one.git
synced 2025-01-10 01:17:40 +03:00
97eae56e60
init scripts execution is moved to an external one-context.d script. Now there is a new context variable (INIT_SCRIPTS) with the list of files to execute from context.
21 lines
297 B
Bash
Executable File
21 lines
297 B
Bash
Executable File
#!/bin/bash
|
|
|
|
MOUNT_DIR=/mnt
|
|
TMP_DIR=/tmp/one-context-tmp
|
|
|
|
if [ -z "$INIT_SCRIPTS" ]; then
|
|
if [ -f "$MOUNT_DIR/init.sh" ]; then
|
|
INIT_SCRIPTS=init.sh
|
|
fi
|
|
fi
|
|
|
|
mkdir -p $TMP_DIR
|
|
cd $MOUNT_DIR
|
|
|
|
for f in $INIT_SCRIPTS; do
|
|
cp $f $TMP_DIR
|
|
chmod +x $TMP_DIR/$f
|
|
$TMP_DIR/$f
|
|
done
|
|
|