projects
/
grml-debootstrap.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
1bbb415
)
Some more umount checks
author
Michael Prokop
<mika@grml.org>
Tue, 5 Jun 2007 12:05:02 +0000
(14:05 +0200)
committer
Michael Prokop
<mika@grml.org>
Tue, 5 Jun 2007 12:05:02 +0000
(14:05 +0200)
grml-debootstrap
patch
|
blob
|
history
diff --git
a/grml-debootstrap
b/grml-debootstrap
index
990566f
..
cbd131a
100755
(executable)
--- a/
grml-debootstrap
+++ b/
grml-debootstrap
@@
-4,7
+4,7
@@
# Authors: grml-team (grml.org), (c) Michael Prokop <mika@grml.org>
# Bug-Reports: see http://grml.org/bugs/
# License: This file is licensed under the GPL v2.
# Authors: grml-team (grml.org), (c) Michael Prokop <mika@grml.org>
# Bug-Reports: see http://grml.org/bugs/
# License: This file is licensed under the GPL v2.
-# Latest change: Die Jun 05 14:0
2:22
CEST 2007 [mika]
+# Latest change: Die Jun 05 14:0
4:47
CEST 2007 [mika]
################################################################################
# http://www.debian.org/releases/stable/i386/index.html.en
################################################################################
# http://www.debian.org/releases/stable/i386/index.html.en
@@
-96,7
+96,7
@@
while [ "$#" -gt "0" ] ; do
;;
-i|--iso)
shift
;;
-i|--iso)
shift
- [ -n "$MIRROR" ] && unset MIRROR
+
[ -n "$MIRROR" ] && unset MIRROR
ISO=$1
;;
-h|--help)
ISO=$1
;;
-h|--help)
@@
-386,14
+386,18
@@
grub_install() {
# unmount $MNTPOINRT {{{
umount_chroot() {
if [ -n "$ISODIR" ] ; then
# unmount $MNTPOINRT {{{
umount_chroot() {
if [ -n "$ISODIR" ] ; then
- einfo "Unmount $MNTPOINT/$ISODIR"
- umount "$MNTPOINT/$ISODIR"
- eend $?
+ if grep -q "$ISODIR" /proc/mounts ; then
+ einfo "Unmount $MNTPOINT/$ISODIR"
+ umount "$MNTPOINT/$ISODIR"
+ eend $?
+ fi
fi
fi
- if [ -n "$PARTITION" ] ; then
- einfo "Unmount $MNTPOINT"
- umount $MNTPOINT
- eend $?
+ if grep -q "$PARTITION" /proc/mounts ; then
+ if [ -n "$PARTITION" ] ; then
+ einfo "Unmount $MNTPOINT"
+ umount $MNTPOINT
+ eend $?
+ fi
fi
}
# }}}
fi
}
# }}}