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