summaryrefslogtreecommitdiff
path: root/init.d
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2007-07-11 10:39:01 +0000
committerRoy Marples <roy@marples.name>2007-07-11 10:39:01 +0000
commitb4af22eddab0fedc65be1f2cc5c4ed2869ff8149 (patch)
tree1bdb56ea4823ea8f9aaa912898fc325fd9b5e8d2 /init.d
parent2aa7ebfe0d05bb94708e890268ab2c0701312f71 (diff)
downloadopenrc-b4af22eddab0fedc65be1f2cc5c4ed2869ff8149.tar.gz
openrc-b4af22eddab0fedc65be1f2cc5c4ed2869ff8149.tar.bz2
openrc-b4af22eddab0fedc65be1f2cc5c4ed2869ff8149.tar.xz
Only mount stuff if not already mounted
Diffstat (limited to 'init.d')
-rwxr-xr-xinit.d/localmount10
1 files changed, 5 insertions, 5 deletions
diff --git a/init.d/localmount b/init.d/localmount
index 0268848..bf12638 100755
--- a/init.d/localmount
+++ b/init.d/localmount
@@ -77,7 +77,7 @@ start() {
fi
# Setup Kernel Support for the NFS daemon status
- if [ -d /proc/fs/nfsd ] ; then
+ if [ -d /proc/fs/nfsd ] && ! mountinfo /proc/fs/nfsd >/dev/null ; then
if grep -qs nfsd /proc/filesystems ; then
ebegin "Mounting nfsd filesystem"
mount -t nfsd -o nodev,noexec,nosuid \
@@ -87,7 +87,7 @@ start() {
fi
# Setup Kernel Support for miscellaneous Binary Formats
- if [ -d /proc/sys/fs/binfmt_misc ] ; then
+ if [ -d /proc/sys/fs/binfmt_misc ] && ! mountinfo /proc/sys/fs/binfmt_misc >/dev/null ; then
if grep -qs binfmt_misc /proc/filesystems ; then
ebegin "Mounting misc binary format filesystem"
mount -t binfmt_misc -o nodev,noexec,nosuid \
@@ -97,7 +97,7 @@ start() {
fi
# Setup Kernel Support for securityfs
- if [ -d /sys/kernel/security ] ; then
+ if [ -d /sys/kernel/security ] && ! mountinfo /sys/kernel/security >/dev/null ; then
if grep -qs securityfs /proc/filesystems ; then
ebegin "Mounting security filesystem"
mount -t securityfs securityfs /sys/kernel/security \
@@ -107,7 +107,7 @@ start() {
fi
# Setup Kernel Support for debugfs
- if [ -d /sys/kernel/debug ] ; then
+ if [ -d /sys/kernel/debug ] && ! mountinfo /sys/kernel/debug >/dev/null ; then
if grep -qs debugfs /proc/filesystems ; then
ebegin "Mounting debug filesystem"
mount -t debugfs debugfs /sys/kernel/debug \
@@ -117,7 +117,7 @@ start() {
fi
# Setup Kernel Support for SELinux
- if [ -d /selinux ] ; then
+ if [ -d /selinux ] && ! mountinfo /selinux >/dev/null ; then
if grep -qs selinuxfs /proc/filesystems ; then
ebegin "Mounting SELinux filesystem"
mount -t selinuxfs selinuxfs /selinux