Commit 3200c423 authored by Joey Hess's avatar Joey Hess

* Warn if umount fails for some reason (such as a desktop environment

  keeping the mount point busy).
* Avoid exiting test scripts when a umount fails, as that can result in
  incomplete OS detection, and does not result in os-prober as a whole
  failing.

r52681
parent f29248cf
......@@ -44,6 +44,10 @@ error() {
log "error: $@"
}
warn() {
log "warning: $@"
}
debug() {
log "debug: $@"
}
......
os-prober (1.25) UNRELEASED; urgency=low
[ Frans Pop ]
* Disable excessive debug messages when parsing grub configs (see #471501).
[ Joey Hess ]
* Warn if umount fails for some reason (such as a desktop environment
keeping the mount point busy).
* Avoid exiting test scripts when a umount fails, as that can result in
incomplete OS detection, and does not result in os-prober as a whole
failing.
-- Frans Pop <fjp@debian.org> Wed, 19 Mar 2008 14:50:09 +0100
os-prober (1.24) unstable; urgency=low
......
......@@ -45,7 +45,9 @@ else
fi
done
if [ "$bootmounted" = 1 ]; then
umount $mpoint/boot || true
if ! umount $mpoint/boot; then
warn "failed to umount $mpoint/boot"
fi
fi
fi
fi
......@@ -22,7 +22,9 @@ for type in $(grep -v nodev /proc/filesystems); do
if $test $partition $bootpart $tmpmnt $type; then
debug "$test succeeded"
umount $tmpmnt/boot 2>/dev/null || true
umount $tmpmnt
if ! umount $tmpmnt; then
warn "failed to umount $tmpmnt"
fi
rmdir $tmpmnt || true
exit 0
fi
......@@ -30,7 +32,9 @@ for type in $(grep -v nodev /proc/filesystems); do
done
umount $tmpmnt/boot 2>/dev/null || true
umount $tmpmnt
if ! umount $tmpmnt; then
warn "failed to umount $tmpmnt"
fi
break
fi
......
......@@ -32,13 +32,17 @@ for type in $types $delaytypes; do
if [ -f $test ] && [ -x $test ]; then
if $test $partition $tmpmnt $type; then
debug "os found by subtest $test"
umount $tmpmnt
if ! umount $tmpmnt; then
warn "failed to umount $tmpmnt"
fi
rmdir $tmpmnt || true
exit 0
fi
fi
done
umount $tmpmnt
if ! umount $tmpmnt; then
warn "failed to umount $tmpmnt"
fi
break
fi
done
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment