Merge branch 'upstream'
[automated-distro-installer] / fai / config / scripts / ROCKY / 10-security
diff --git a/fai/config/scripts/ROCKY/10-security b/fai/config/scripts/ROCKY/10-security
new file mode 100755 (executable)
index 0000000..566c3f4
--- /dev/null
@@ -0,0 +1,14 @@
+#! /bin/bash
+
+# (c) Michael Goetze, 2010-11, mgoetze@mgoetze.net
+# Thomas Lange, 2015-2020
+
+error=0; trap 'error=$(($?>$error?$?:$error))' ERR # save maximum error code
+
+$ROOTCMD usermod -p $ROOTPW root
+
+fcopy -v /etc/selinux/config
+$ROOTCMD fixfiles onboot # this fixes the SELinux security contexts during the first boot
+chmod a+rx $target
+
+exit $error