mount securityfs in a seperate dracut module

master
Harald Hoyer 2011-09-20 11:16:53 +02:00
parent d63fdc1198
commit 16457c869d
4 changed files with 26 additions and 7 deletions

View File

@ -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"
}

View File

@ -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

View File

@ -7,7 +7,7 @@ check() {
}

depends() {
echo masterkey
echo masterkey securityfs
return 0
}


View File

@ -86,12 +86,6 @@ RD_DEBUG=""
[ ! -d /sys/kernel ] && \
mount -t sysfs -o nosuid,noexec,nodev sysfs /sys >/dev/null 2>&1

SECURITYFSDIR="/sys/kernel/security"
export SECURITYFSDIR
if ! ismounted "${SECURITYFSDIR}"; then
mount -t securityfs -o nosuid,noexec,nodev securityfs ${SECURITYFSDIR} >/dev/null 2>&1
fi

if [ -x /lib/systemd/systemd-timestamp ]; then
RD_TIMESTAMP=$(/lib/systemd/systemd-timestamp)
else