summaryrefslogtreecommitdiff
path: root/sh.BSD
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2008-03-11 13:39:20 +0000
committerRoy Marples <roy@marples.name>2008-03-11 13:39:20 +0000
commit52a3cc162ba7b18b568c091eff5ec35700847eb6 (patch)
tree70b380f6ae39a2aaa1d9d094be57ba96bd06b12a /sh.BSD
parent0fa512c2b53fa6452078a8e0cd6279e56e271e3b (diff)
downloadopenrc-52a3cc162ba7b18b568c091eff5ec35700847eb6.tar.gz
openrc-52a3cc162ba7b18b568c091eff5ec35700847eb6.tar.bz2
openrc-52a3cc162ba7b18b568c091eff5ec35700847eb6.tar.xz
Add a --mount command to fstabinfo so it can mount specific mount points, as mount can get confused with binded mounts, bug #36.
Diffstat (limited to 'sh.BSD')
-rw-r--r--sh.BSD/init.sh.in10
1 files changed, 6 insertions, 4 deletions
diff --git a/sh.BSD/init.sh.in b/sh.BSD/init.sh.in
index 8d08b0c..dbff736 100644
--- a/sh.BSD/init.sh.in
+++ b/sh.BSD/init.sh.in
@@ -22,10 +22,12 @@ mount_svcdir()
cp -p "${RC_SVCDIR}"/deptree "${RC_SVCDIR}"/depconfig \
"${RC_SVCDIR}"/nettree "${RC_LIBDIR}"/tmp 2>/dev/null
fi
- if ! mount -t tmpfs -o rw,noexec,nosuid none "${RC_SVCDIR}" 2>/dev/null; then
- mdconfig -a -t malloc -s "${rc_svcsize:-1024}"k -u 0
- newfs -b 4096 -i 1024 -n /dev/md0
- mount -o rw,noexec,nosuid /dev/md0 "${RC_SVCDIR}"
+ if ! fstabinfo --mount "${RC_SVCDIR}"; then
+ if ! mount -t tmpfs -o rw,noexec,nosuid none "${RC_SVCDIR}" 2>/dev/null; then
+ mdconfig -a -t malloc -s "${rc_svcsize:-1024}"k -u 0
+ newfs -b 4096 -i 1024 -n /dev/md0
+ mount -o rw,noexec,nosuid /dev/md0 "${RC_SVCDIR}"
+ fi
fi
retval=$?
if ${dotmp}; then