Move try_umount above cleanup()
authorDarshaka Pathirana <dpat@syn-net.org>
Fri, 2 Feb 2024 14:11:20 +0000 (15:11 +0100)
committerDarshaka Pathirana <dpat@syn-net.org>
Fri, 2 Feb 2024 14:17:58 +0000 (15:17 +0100)
commit811c294079691675c4815808fe780e472bf84233
tree9f83c77701eaa083f49b3fc54ec935e2c3f5730f
parentdf9c1ae2086610336fe7334a107dfe806765935a
Move try_umount above cleanup()

try_umount() replaced all umount calls in PR #264.

Unfortunately, the function is defined too late for a few of functions,
especially for cleanup(), which fails with:

   -> Failed (rc=1)
  /sbin/grml-debootstrap: line 260: try_umount: command not found
  Unexpected non-zero exit code 127 in /sbin/grml-debootstrap /sbin/grml-debootstrap /sbin/grml-debootstrap /sbin/grml-debootstrap /sbin/grml-debootstrap at line 260 329 1107 1179 0 detected!
  last bash command: try_umount 3 "${MNTPOINT}"/boot/efi
   -> Failed (rc=1)
  /sbin/grml-debootstrap: line 260: try_umount: command not found

Moved the try_umount above cleanup().

Closes: #271
grml-debootstrap