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