From b4af22eddab0fedc65be1f2cc5c4ed2869ff8149 Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Wed, 11 Jul 2007 10:39:01 +0000 Subject: Only mount stuff if not already mounted --- init.d/localmount | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'init.d/localmount') diff --git a/init.d/localmount b/init.d/localmount index 02688488..bf12638b 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 -- cgit v1.2.3