Fix unmounting [..]/dev once more (issue #50)
[grml-debootstrap.git] / grml-debootstrap
index 0f3304c..cf9d00b 100755 (executable)
@@ -142,6 +142,7 @@ fi
 # early helper functions {{{
 GOOD='\e[32;01m'
 BAD='\e[31;01m'
+WARN='\e[33;01m'
 NORMAL='\e[0m'
 
 einfo() {
@@ -156,6 +157,11 @@ einfon() {
   return 0
 }
 
+ewarn() {
+  printf " ${WARN}*${NORMAL} $*\n"
+  return 0
+}
+
 eerror() {
   [ "${RC_ENDCOL}" != "yes" ] && [ "${LAST_E_CMD}" = "ebegin" ] && echo
   printf " ${BAD}*${NORMAL} $*\n" >&2
@@ -1124,7 +1130,7 @@ finalize_vm() {
 
   umount "${MNTPOINT}"/proc
   umount "${MNTPOINT}"/sys
-  umount "${MNTPOINT}"/dev
+  try_umount 3 "${MNTPOINT}"/dev
   umount "${MNTPOINT}"
   kpartx -d "${ORIG_TARGET}" >/dev/null
 }