[projects/rc-scripts] - apply rc-scripts-modprobe-cache.patch and rc-scripts-selinuxfs.patch patches from packages/rc-scri
adwol
adwol at pld-linux.org
Tue Sep 4 17:13:42 CEST 2018
commit 1062272ed0bc43356bd849cd7277ab2dd73db515
Author: Adam Osuchowski <adwol at pld-linux.org>
Date: Tue Sep 4 17:10:15 2018 +0200
- apply rc-scripts-modprobe-cache.patch and rc-scripts-selinuxfs.patch patches from packages/rc-scripts
rc.d/rc.sysinit | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)
---
diff --git a/rc.d/rc.sysinit b/rc.d/rc.sysinit
index 6fdca19f..b5fc94ff 100755
--- a/rc.d/rc.sysinit
+++ b/rc.d/rc.sysinit
@@ -47,6 +47,7 @@ modprobe_c() {
# filter only what is wanted by this script: aliases and options
modprobe_c_cache=$(modprobe -c | grep -E '^(alias|options)')
+ echo "$modprobe_c_cache"
}
# parse kernel cmdline
@@ -123,10 +124,11 @@ init_selinux() {
if ! grep -Fq selinuxfs /proc/filesystems; then
# no support in kernel, no chance
SELINUX=no
+ return
fi
- if ! is_fsmounted selinuxfs /selinux; then
- mount -n -o gid=17 -t selinuxfs selinuxfs /selinux
+ if ! is_fsmounted selinuxfs $selinuxfsdir; then
+ mount -n -o gid=17 -t selinuxfs selinuxfs $selinuxfsdir
fi
# Check SELinux status
@@ -430,6 +432,12 @@ if ! is_yes "$VSERVER" && [[ "$container" != lxc* ]]; then
mount -n -o gid=17 -t securityfs securityfs /sys/kernel/security
fi
+ if [ -d /sys/fs/selinux ]; then
+ # Linux 3.0+
+ selinuxfsdir=/sys/fs/selinux
+ else
+ selinuxfsdir=/selinux
+ fi
init_selinux
# PLD Linux LiveCD support
@@ -701,8 +709,8 @@ if ! is_yes "$VSERVER" && [[ "$container" != lxc* ]]; then
fi
fi
- if is_fsmounted selinuxfs /selinux; then
- mount -f -t selinuxfs selinuxfs /selinux 2> /dev/null
+ if is_fsmounted selinuxfs $selinuxfsdir; then
+ mount -f -t selinuxfs selinuxfs $selinuxfsdir 2> /dev/null
fi
if [ ! -f /proc/modules ]; then
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/projects/rc-scripts.git/commitdiff/aaf9e6938d0bbfad801a3a8cf758563e160636bb
More information about the pld-cvs-commit
mailing list