case "$MODE" in
    finalization)
	    # create default lts.conf
        cat <<EOF > $ROOT/etc/lts.conf
# This is the default lts.conf file for ltsp 5.  For more information about
# valid options please see lts.conf(5) man page, available in the ltsp-docs
# package.
#
# Note that things like sound and local device support are auto-enabled if the
# corresponding packages are installed, there is no need to manually set these
# options anymore.

[default] 
    LTSP_CONFIG=True
    SOUND=True
    LOCALDEV=True
    LOCAL_APP=True
    X_SMART_COLOR_DEPTH=False
    #CONFIGURE_X=False
EOF
	cp -r /etc/passwd $ROOT/etc/passwd || :
	cp -r /etc/shadow $ROOT/etc/shadow || :
	cp -r /etc/group  $ROOT/etc/group || :
	cp -r /etc/sudoers $ROOT/etc/sudoers || :
	cp -r /var/lib/dpkg/statoverride $ROOT/var/lib/dpkg || :
	if [ -d /etc/fly-kiosk ]; then
	    rm -r $ROOT/etc/fly-kiosk || :
	    cp -rp /etc/fly-kiosk $ROOT/etc || :
	fi
	if [ -d $ROOT/etc/X11/Xsession.d ]; then
	    cat <<EOF > $ROOT/etc/X11/Xsession.d/98-reset-menutime
if [ -f ~/.fly/menutime ]; then
    echo 0 > ~/.fly/menutime
fi
EOF
	fi
	;;
esac
