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