d0754d3
#!/bin/bash
d0754d3
d0754d3
if [ ! -f /etc/selinux/config ]; then
d0754d3
    SELINUXTYPE=none
d0754d3
else
d0754d3
    source /etc/selinux/config
d0754d3
fi
d0754d3
d0754d3
cp -R --preserve=mode,ownership,timestamps,links /usr/share/selinux/$1/default/* /var/lib/selinux/$1
d0754d3
d0754d3
if selinuxenabled; then
d0754d3
    semodule -B -n
d0754d3
d0754d3
    if [ "$1" = "$SELINUXTYPE" ]; then
d0754d3
        reboot
d0754d3
    fi
d0754d3
fi