summaryrefslogtreecommitdiff
path: root/modules.d/96securityfs
diff options
context:
space:
mode:
authorHarald Hoyer <harald@redhat.com>2011-09-20 11:16:53 +0200
committerHarald Hoyer <harald@redhat.com>2011-09-20 11:16:53 +0200
commit16457c869d3fac6a94e204f1edac1ad9fffae55a (patch)
tree16373c0c118041079a1eab3acaf498fd84f218a2 /modules.d/96securityfs
parentd63fdc1198cd13ed68e7f08acd7ca164c9f35262 (diff)
downloaddracut-16457c869d3fac6a94e204f1edac1ad9fffae55a.tar.gz
dracut-16457c869d3fac6a94e204f1edac1ad9fffae55a.tar.bz2
dracut-16457c869d3fac6a94e204f1edac1ad9fffae55a.zip
mount securityfs in a seperate dracut module
Diffstat (limited to 'modules.d/96securityfs')
-rwxr-xr-xmodules.d/96securityfs/module-setup.sh15
-rwxr-xr-xmodules.d/96securityfs/securityfs.sh10
2 files changed, 25 insertions, 0 deletions
diff --git a/modules.d/96securityfs/module-setup.sh b/modules.d/96securityfs/module-setup.sh
new file mode 100755
index 00000000..fbe3aa3e
--- /dev/null
+++ b/modules.d/96securityfs/module-setup.sh
@@ -0,0 +1,15 @@
+#!/bin/bash
+# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
+# ex: ts=8 sw=4 sts=4 et filetype=sh
+
+check() {
+ return 255
+}
+
+depends() {
+ return 0
+}
+
+install() {
+ inst_hook cmdline 60 "$moddir/securityfs.sh"
+}
diff --git a/modules.d/96securityfs/securityfs.sh b/modules.d/96securityfs/securityfs.sh
new file mode 100755
index 00000000..03ee4dda
--- /dev/null
+++ b/modules.d/96securityfs/securityfs.sh
@@ -0,0 +1,10 @@
+#!/bin/sh
+# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
+# ex: ts=8 sw=4 sts=4 et filetype=sh
+
+SECURITYFSDIR="/sys/kernel/security"
+export SECURITYFSDIR
+
+if ! ismounted "${SECURITYFSDIR}"; then
+ mount -t securityfs -o nosuid,noexec,nodev securityfs ${SECURITYFSDIR} >/dev/null 2>&1
+fi