diff --git a/tools/xen/scripts/on_exit.sh b/tools/xen/scripts/on_exit.sh index 2441e3d84a..2846dc42d0 100755 --- a/tools/xen/scripts/on_exit.sh +++ b/tools/xen/scripts/on_exit.sh @@ -3,7 +3,9 @@ set -e set -o xtrace -declare -a on_exit_hooks +if [ -z "${on_exit_hooks:-}" ]; then + on_exit_hooks=() +fi on_exit() {