diff options
author | Roy Marples <roy@marples.name> | 2008-03-11 13:39:20 +0000 |
---|---|---|
committer | Roy Marples <roy@marples.name> | 2008-03-11 13:39:20 +0000 |
commit | 52a3cc162ba7b18b568c091eff5ec35700847eb6 (patch) | |
tree | 70b380f6ae39a2aaa1d9d094be57ba96bd06b12a /sh.Linux/init.sh.in | |
parent | 0fa512c2b53fa6452078a8e0cd6279e56e271e3b (diff) |
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.Linux/init.sh.in')
-rw-r--r-- | sh.Linux/init.sh.in | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/sh.Linux/init.sh.in b/sh.Linux/init.sh.in index 190f8f17..ac1ae0a6 100644 --- a/sh.Linux/init.sh.in +++ b/sh.Linux/init.sh.in @@ -44,9 +44,7 @@ mount_svcdir() fi # If we have no entry in fstab for $RC_SVCDIR, provide our own - if fstabinfo --quiet "${RC_SVCDIR}"; then - mount -n "${RC_SVCDIR}" - else + if ! fstabinfo --mount "${RC_SVCDIR}"; then mount -n -t "${fs}" ${fsopts} "${devdir}" "${RC_SVCDIR}" fi @@ -91,9 +89,7 @@ if ${mountproc}; then procfs="proc" [ "${RC_UNAME}" = "GNU/kFreeBSD" ] && proc="linprocfs" ebegin "Mounting ${procfs} at /proc" - if fstabinfo --quiet /proc; then - mount -n /proc - else + if ! fstabinfo --mount /proc; then mount -n -t "${procfs}" -o noexec,nosuid,nodev proc /proc fi eend $? @@ -116,9 +112,7 @@ then if [ -d /sys ]; then if ! mountinfo --quiet /sys; then ebegin "Mounting sysfs at /sys" - if fstabinfo --quiet /sys; then - mount -n /sys - else + if ! fstabinfo --mount /sys; then mount -n -t sysfs -o noexec,nosuid,nodev sysfs /sys fi eend $? @@ -173,9 +167,7 @@ do if [ -d "$2" ]; then ebegin "Mounting $1 at $2" - if fstabinfo --quiet "$2"; then - mount -n "$2" - else + if ! fstabinfo --mount "$2"; then mount -n -t "$1" -o noexec,nosuid"$4" "$5" "$2" fi eend $? |