diff options
author | Andreas Grapentin <andreas@grapentin.org> | 2020-04-11 16:45:13 +0200 |
---|---|---|
committer | Andreas Grapentin <andreas@grapentin.org> | 2020-04-11 16:45:13 +0200 |
commit | d18b703572201c6a0b896d1a35f630f6f86bdce2 (patch) | |
tree | 890215f2cc9ee817bf4a15e5996e9fca6e8578c5 | |
parent | 340dd9a1794e6a5700ed70ec56a35ef117f0fe79 (diff) |
fixing run order of hooks
-rwxr-xr-x | src/pvmbootstrap.sh | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/pvmbootstrap.sh b/src/pvmbootstrap.sh index 40cc89e..288d4eb 100755 --- a/src/pvmbootstrap.sh +++ b/src/pvmbootstrap.sh @@ -331,9 +331,10 @@ pacman -U --noconfirm /var/cache/pacman/pkg/ca-certificates-utils-*.pkg.tar.xz # run the hooks shopt -s nullglob -for hook in /root/hooks/*; do - echo "[hooks.sh] running hook: '\$(basename \$hook)'" - source "\$hook" +for hook in ${Hooks[@]}; do + hook="\$(basename "\$hook")" + echo "[hooks.sh] running hook: '\$hook'" + source /root/hooks/"\$hook" done shopt -u nullglob @@ -347,7 +348,6 @@ rm -f /var/cache/pacman/pkg/* # report success :) echo "$PVM_HOOKS_SUCCESS_MSG - powering off" -[[ -e "/usr/lib/libretools/common.sh" ]] && rm -f /usr/lib/libretools/common.sh EOF # create a pre-init service to run the hooks |