T=/tmp/$$
mkdir -p /var/log/journal
#sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*
systemctl disable firewalld
systemctl stop firewalld
dnf update -y
dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
dnf install -y https://download1.rpmfusion.org/free/el/rpmfusion-free-release-8.noarch.rpm
dnf group install -y "Development Tools"
dnf install -y miniupnpc
dnf install -y dialog cvs
dnf install -y epel-release
dnf install -y kernel-devel
dnf install -y Xorg xterm
dnf install -y vlc htop
dnf install -y https://zfsonlinux.org/epel/zfs-release-2-3$(rpm --eval "%{dist}").noarch.rpm
dnf install -y zfs
dnf install -y xorg-macros
dnf install -y xinetd
dnf install -y telnet
dnf install -y VirtualBox
dnf install -y tigervnc-server
systemctl enable xinetd
systemctl start xinetd
echo zfs >/etc/modules-load.d/zfs.conf
grubby --update-kernel ALL --args selinux=0
(
cd /etc/modprobe.d
echo "install module_name /bin/false" > nouveau.conf
)
if dialog --inputbox "hostname" 0 0 "host.domain" 2> $T
then
	set $(awk -F. '{printf "%s %s\n",$1,$2}' $T)
	H=$1
	D=$2
fi
cat <<% >> $T
kernel.domainname=$D
kernel.hostname=$H.$D
%
mv $T /etc/sysctl.conf
/usr/lib/systemd/systemd-sysctl
dnf install -y firefox mc
sed -i.orig "s/enforcing/disabled/" /etc/selinux/config
cat <<% > /etc/xinetd.d/Xvnc
service rfb
{
	flags			= REUSE
	socket_type		= stream
	wait			= no
	user			= root
	server			= /usr/bin/Xvnc
	server_args		= -IdleTimeout 600 -listen tcp -inetd -ac -query localhost -once -geometry 1208x680 -depth 16 -securitytypes none
	log_on_failure		+= USERID
/bin/bash: indent: command not found
%
