Only mount stuff if not already mounted
This commit is contained in:
parent
2aa7ebfe0d
commit
b4af22edda
@ -77,7 +77,7 @@ start() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Setup Kernel Support for the NFS daemon status
|
# 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
|
if grep -qs nfsd /proc/filesystems ; then
|
||||||
ebegin "Mounting nfsd filesystem"
|
ebegin "Mounting nfsd filesystem"
|
||||||
mount -t nfsd -o nodev,noexec,nosuid \
|
mount -t nfsd -o nodev,noexec,nosuid \
|
||||||
@ -87,7 +87,7 @@ start() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Setup Kernel Support for miscellaneous Binary Formats
|
# 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
|
if grep -qs binfmt_misc /proc/filesystems ; then
|
||||||
ebegin "Mounting misc binary format filesystem"
|
ebegin "Mounting misc binary format filesystem"
|
||||||
mount -t binfmt_misc -o nodev,noexec,nosuid \
|
mount -t binfmt_misc -o nodev,noexec,nosuid \
|
||||||
@ -97,7 +97,7 @@ start() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Setup Kernel Support for securityfs
|
# 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
|
if grep -qs securityfs /proc/filesystems ; then
|
||||||
ebegin "Mounting security filesystem"
|
ebegin "Mounting security filesystem"
|
||||||
mount -t securityfs securityfs /sys/kernel/security \
|
mount -t securityfs securityfs /sys/kernel/security \
|
||||||
@ -107,7 +107,7 @@ start() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Setup Kernel Support for debugfs
|
# 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
|
if grep -qs debugfs /proc/filesystems ; then
|
||||||
ebegin "Mounting debug filesystem"
|
ebegin "Mounting debug filesystem"
|
||||||
mount -t debugfs debugfs /sys/kernel/debug \
|
mount -t debugfs debugfs /sys/kernel/debug \
|
||||||
@ -117,7 +117,7 @@ start() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Setup Kernel Support for SELinux
|
# Setup Kernel Support for SELinux
|
||||||
if [ -d /selinux ] ; then
|
if [ -d /selinux ] && ! mountinfo /selinux >/dev/null ; then
|
||||||
if grep -qs selinuxfs /proc/filesystems ; then
|
if grep -qs selinuxfs /proc/filesystems ; then
|
||||||
ebegin "Mounting SELinux filesystem"
|
ebegin "Mounting SELinux filesystem"
|
||||||
mount -t selinuxfs selinuxfs /selinux
|
mount -t selinuxfs selinuxfs /selinux
|
||||||
|
Loading…
x
Reference in New Issue
Block a user