summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDieter Plaetinck <dieter@plaetinck.be>2008-11-01 16:01:39 +0100
committerDieter Plaetinck <dieter@plaetinck.be>2008-11-01 16:01:39 +0100
commit6248a80e2fe99262803376a40ee7bc85eb1ba2b3 (patch)
tree672fba2ec9e8d8b675370a4aef9711941a0d012c /src
parent1fa504381cfc71f9e7ab3c83b43d13b47fe406d0 (diff)
fix for target_special_fs when fs are already mounted
Diffstat (limited to 'src')
-rw-r--r--src/lib/lib-blockdevices-filesystems.sh8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/lib-blockdevices-filesystems.sh b/src/lib/lib-blockdevices-filesystems.sh
index b441a5e..e038ddc 100644
--- a/src/lib/lib-blockdevices-filesystems.sh
+++ b/src/lib/lib-blockdevices-filesystems.sh
@@ -12,10 +12,10 @@ target_special_fs ()
! [ -d $TARGET_DIR/proc ] && mkdir $TARGET_DIR/proc
! [ -d $TARGET_DIR/sys ] && mkdir $TARGET_DIR/sys
! [ -d $TARGET_DIR/dev ] && mkdir $TARGET_DIR/dev
- #TODO: check mtab if not mounted already
- mount -t proc none $TARGET_DIR/proc || die_error "Could not mount $TARGET_DIR/proc" #NOTE: setup script uses mount -t proc proc ? what's best?
- mount -t sysfs none $TARGET_DIR/sys || die_error "Could not mount $TARGET_DIR/sys" # NOTE: setup script uses mount -t sysfs sysfs ? what's best?
- mount -o bind /dev $TARGET_DIR/dev || die_error "Could not mount $TARGET_DIR/dev"
+ #mount, if not mounted yet
+ mount | grep -q "$TARGET_DIR/proc" || mount -t proc none $TARGET_DIR/proc || die_error "Could not mount $TARGET_DIR/proc" #NOTE: setup script uses mount -t proc proc ? what's best?
+ mount | grep -q "$TARGET_DIR/sys" || mount -t sysfs none $TARGET_DIR/sys || die_error "Could not mount $TARGET_DIR/sys" # NOTE: setup script uses mount -t sysfs sysfs ? what's best?
+ mount | grep -q "$TARGET_DIR/dev" || mount -o bind /dev $TARGET_DIR/dev || die_error "Could not mount $TARGET_DIR/dev"
elif [ "$1" = off ]
then
umount $TARGET_DIR/proc || die_error "Could not umount $TARGET_DIR/proc"