18 lines
322 B
Plaintext
18 lines
322 B
Plaintext
|
#!/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
|