X-Git-Url: https://git.tld-linux.org/?a=blobdiff_plain;f=rc.d%2Frc.sysinit;fp=rc.d%2Frc.sysinit;h=750e16a50800c23c46e8ebf92cde1013645f55ac;hb=72819baa8397eafde951f1437b9cdcf964f44c1d;hp=524fe973224954df24c2e4934c5eb36a14e44fb6;hpb=20920d818d785137888facc07b84771ded2a70c2;p=rc-scripts.git diff --git a/rc.d/rc.sysinit b/rc.d/rc.sysinit index 524fe97..750e16a 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,8 +124,8 @@ init_selinux() { if ! grep -Fq selinuxfs /proc/filesystems; then # no support in kernel, no chance SELINUX=no - elif ! is_fsmounted selinuxfs /selinux; then - mount -n -t selinuxfs selinuxfs /selinux + elif ! is_fsmounted selinuxfs $selinuxfsdir; then + mount -n -t selinuxfs selinuxfs $selinuxfsdir fi # Check SELinux status @@ -378,6 +379,12 @@ if [[ "$container" != lxc* ]]; then mount -n -o rw -t efivarfs efivarfs /sys/firmware/efi/efivars fi + if [ -d /sys/fs/selinux ]; then + # Linux 3.0+ + selinuxfsdir=/sys/fs/selinux + else + selinuxfsdir=/selinux + fi init_selinux # Choose Hardware profile @@ -647,8 +654,8 @@ if [[ "$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