Skip to content

Commit

Permalink
fix esxi unmounting (#184)
Browse files Browse the repository at this point in the history
let the cleanup code unmount dirs
  • Loading branch information
alexsander-souza authored Dec 15, 2023
1 parent 42489eb commit cb16c6a
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions vmware-esxi/post.sh
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
#!/bin/sh -x

BOOT_DIR="${TMP_DIR:?}"/boot

echo 'Adding curtin-hooks to image...'
mount_part 1 "$TMP_DIR"/boot fusefat
cp -rv curtin "$TMP_DIR"/boot/
mount_part 1 "$BOOT_DIR" fusefat
cp -rv curtin "$BOOT_DIR"

echo 'Adding post-install scripts to image...'
cp -v scripts.tar.xz "$TMP_DIR"/boot/curtin/

echo 'Unmounting image...'
sync -f "$TMP_DIR"/boot
fusermount -z -u "$TMP_DIR"/boot
grep -qs "$TMP_DIR/boot " /proc/mounts && umount -f "$TMP_DIR"/boot
cp -v scripts.tar.xz "$BOOT_DIR"/curtin/

echo 'Done'

0 comments on commit cb16c6a

Please sign in to comment.