bootutils icon indicating copy to clipboard operation
bootutils copied to clipboard

remaster_iso_functions: add trap to umount chroot bind mounts

Open sundarnagarajan opened this issue 7 years ago • 0 comments

When running for chroot target, a number of dirs are mounted (with --bind option). If the user presses CTRL-C or the program abends for any reason during this phase,:

  • Those directories remain mounted
  • The extract dir cannot be removed because of those mounts

Solution:

  • Setup a TRAP before entering the chroot
  • Do a umount -f in the trap

sundarnagarajan avatar May 20 '17 20:05 sundarnagarajan