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:
f57ddab
)
check whether is already mounted
author
Michael Prokop
<mika@grml.org>
Fri, 3 Nov 2006 10:24:32 +0000
(11:24 +0100)
committer
Michael Prokop
<mika@grml.org>
Fri, 3 Nov 2006 10:24:32 +0000
(11:24 +0100)
grml-debootstrap
patch
|
blob
|
history
diff --git
a/grml-debootstrap
b/grml-debootstrap
index
dd16b4c
..
3b40372
100644
(file)
--- 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: Fre Nov 03 11:
15:56
CET 2006 [mika]
+# Latest change: Fre Nov 03 11:
24:15
CET 2006 [mika]
################################################################################
# http://www.debian.org/releases/stable/i386/apcs04.html.en
################################################################################
# http://www.debian.org/releases/stable/i386/apcs04.html.en
@@
-35,9
+35,13
@@
$MKFS $TARGET
eend $?
# now mount the new partition
eend $?
# now mount the new partition
-einfo "Mounting $TARGET to $MNTPOINT"
-mount -o rw,suid,dev $TARGET $MNTPOINT
-eend $?
+if grep -q $TARGET /proc/mounts ; then
+ eerror "$TARGEt already mounted, exiting."
+else
+ einfo "Mounting $TARGET to $MNTPOINT"
+ mount -o rw,suid,dev $TARGET $MNTPOINT
+ eend $?
+fi
# get main packages from a debian-mirror
einfo "Running $DEBOOTSTRAP for release $RELEASE using mirror $MIRROR"
# get main packages from a debian-mirror
einfo "Running $DEBOOTSTRAP for release $RELEASE using mirror $MIRROR"