#!/bin/sh

# setup desktop autologin for live user
. /usr/share/fll-live-initscripts/fll_desktop

# systemd-homed support
if [ -x /usr/bin/homectl ]; then
	. /usr/share/fll-live-initscripts/fll_homectl
else
	. /usr/share/fll-live-initscripts/fll_adduser
fi

# setup root home dotfiles
for dotfile in '.bash_logout' '.bash_profile' '.bashrc' '.profile'; do
	if [ -f /etc/skel/${dotfile} ] && [ ! -f /root/${dotfile} ]; then
		cp /etc/skel/${dotfile} /root/${dotfile}
	fi
done
:> /root/.hushlogin
