Allow posix shell

This commit is contained in:
Alexandre
2024-01-13 23:22:06 +01:00
committed by GitHub
parent fa1a6d26c6
commit 571b7bbf8f

View File

@@ -32,8 +32,14 @@ for SCRIPTS in /etc/cont-init.d/*; do
fi fi
# Start the script # Start the script
# shellcheck source=/dev/null if command -v "source" &>/dev/null; then
source "$SCRIPTS" || echo -e "\033[0;31mError\033[0m : $SCRIPTS exiting $?" # Use source to share env variables
# shellcheck source=/dev/null
source "$SCRIPTS" || echo -e "\033[0;31mError\033[0m : $SCRIPTS exiting $?"
else
# Support for posix only shell
/."$SCRIPTS" || echo -e "\033[0;31mError\033[0m : $SCRIPTS exiting $?"
fi
# Cleanup # Cleanup
rm "$SCRIPTS" rm "$SCRIPTS"