if [ groovix-running-live ] ; then
	if [ -e /rofs/etc/groovix/groovix.conf ] ; then
		#maybe-ubiquity is set by kvm during auto installs
		egrep "gxinstall|ubiquity" /proc/cmdline
		if [ $? -eq 0 ] ; then
			# we are running live and have a groovix rofs and have the proper kernel command line parameter, lets do an install
			echo "Groovix install will start in 30 seconds, hit Enter to skip this delay"
			TMOUT=30
			read delay
			groovix-installer 2>&1 | tee /var/log/groovix/installer.log
			if [ $? -eq 0 ] ; then
				echo groovix-installer completed
				echo waiting 60 seconds before rebooting, hit enter to skip delay
				unset TMOUT
				TMOUT=60
				read skipdelay

				shutdown -r now
				sleep 600
			else
				echo
				echo "#######################################"
				echo "###  FATAL ERROR DURING INSTALLATION! "
				echo "### use ctrl-alt-f2 for debug terminal"
				echo "### not rebooting"
				echo "#######################################"
				sleep  999d
			fi

		fi
	fi
fi
