case "$ACTION" in
post)
	useradd -r greeter
	usermod -a -G video greeter
	usermod -a -G netdev greeter
	rm -rf /etc/greetd/config.toml
	mv /etc/greetd/config.toml.2 /etc/greetd/config.toml
	usermod -d /etc/greetd/greeter greeter
	chown greeter /etc/greetd/greeter -R
        tty="$(cat /sys/class/tty/tty0/active | sed 's/.*\(.\)$/\1/')"
	echo "chvt 5" >> /etc/rc.local
        chvt "$tty"
	rm -rf /etc/dinit.d/boot.d/tty5-agetty
	sed -i '/ctrl_interface_group=.*$/d' /etc/wpa_supplicant/wpa_supplicant.conf
	if [ -d /etc/runit/runsvdir/default/wpa_supplicant ]; then
	  :
	else
	  ln -s /etc/sv/wpa_supplicant /etc/runit/runsvdir/default/wpa_supplicant
	fi
	if [ -d /etc/runit/runsvdir/default/dhcpcd ]; then
          :
        else
          ln -s /etc/sv/dhcpcd /etc/runit/runsvdir/default/dhcpcd
        fi
esac
