#!/bin/sh -e return 0 DIR=/usr/share/selinux/policy/current if [ ! -e $DIR ]; then echo "Copying the sample /usr/share/selinux/policy/current directory from" echo "/usr/share/selinux/policy/default" cp -a /usr/share/selinux/policy/default $DIR echo "Removal of unwanted policy files" /usr/sbin/remove-unwanted-policy echo "Installing the new SE Linux policy" echo "none /selinux selinuxfs noauto 0 0" >> /etc/fstab mount /selinux make -s -C /etc/selinux/src install make -s -C /etc/selinux/src load 2> /dev/null || true echo "Running 'make -C /usr/share/selinux/policy/current relabel' to assign SIDs" echo -n "to all files on the system." make -s -C /etc/selinux/src relabel echo "NB if you use an initrd you may need to recreate it before rebooting." echo "Press ENTER to continue" read X else /usr/sbin/selinux-update make -s -C /etc/selinux/src install make -s -C /etc/selinux/src load || true make -s -C /etc/selinux/src file_contexts/file_contexts fi