selinux-policy/selinux-factory-reset
Zdenek Pytela c38b24eb7c Synchronize the repo content with the previous state
After the automated creation of the c8s branch, not all files tracked
previously in dist-git were added to the repository. This commit adds
all required files and also makes necessary changes.

Related: rhbz#2093355
2023-04-13 21:02:31 +02:00

18 lines
322 B
Bash
Executable File

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