diff options
author | Harald Hoyer <harald@redhat.com> | 2011-09-20 11:16:53 +0200 |
---|---|---|
committer | Harald Hoyer <harald@redhat.com> | 2011-09-20 11:16:53 +0200 |
commit | 16457c869d3fac6a94e204f1edac1ad9fffae55a (patch) | |
tree | 16373c0c118041079a1eab3acaf498fd84f218a2 /modules.d/96securityfs | |
parent | d63fdc1198cd13ed68e7f08acd7ca164c9f35262 (diff) | |
download | dracut-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-x | modules.d/96securityfs/module-setup.sh | 15 | ||||
-rwxr-xr-x | modules.d/96securityfs/securityfs.sh | 10 |
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 |