diff options
Diffstat (limited to 'src/lib/lib-blockdevices-filesystems.sh')
-rw-r--r-- | src/lib/lib-blockdevices-filesystems.sh | 8 |
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" |