#
# Copyright (C) 2017 FAUmachine Team <info@faumachine.org>.
# This program is free software. You can redistribute it and/or modify it
# under the terms of the GNU General Public License, either version 2 of
# the License, or (at your option) any later version. See COPYING.
#

#
# Enter Debian-3.1r0a-CD-1.
#
cdrom_insert	Debian-3.1r0a-CD-1
#
# Power-on node.
#
power_on
#
# Wait for boot prompt.
#
wait_asc	boot:						1min
type		"\0d"
#
# Wait for "Choose language".
# Use preselected "English".
# Press return.
#
wait_asc	Choose language					3min
type		"\0d"
#
# Wait for "Choose country or region".
# Use preselected "United States".
# Press return.
#
wait_asc	Choose country or region			1min
type		"\0d"
#
# Wait for "Select a keyboard layout".
# Use preselected "Amarican English".
# Press return.
#
wait_asc	Select a keyboard layout			1min
type		"\0d"
#
# Some intermediate steps.
#
wait_asc	Detecting hardware to find CD-ROM drives	1min
wait_asc	Scanning CD-ROM					6min
wait_asc	Loading components of the Debian installer	1min
wait_asc	Detecting network hardware			6min
#
# Wait for "Detecting network hardware" ("No Ethernet card was detected.")
# Use "ne".
# Press return.
#
# wait_asc	Detecting network hardware			6min
wait_asc	No Ethernet card was detected.			6min
type		"n"
type		"n"
type		"\0d"
#
# Wait for "The module ne failed to load."
# Type "io=0x300".
# Press return.
#
wait_asc	The module ne failed to load.			1min
type		"io=0x300"
type		"\0d"
#
# Wait for intermediate steps.
#
wait_asc	Configuring the network with DHCP		5min
#
# Wait for "Please enter the hostname for this system."
#
wait_asc	Please enter the hostname for this system.	1min
#
# Switch to second console.
# Type <Alt><F2>.
#
press_alt
type		"\11"
release_alt
#
# Wait for "Please press Enter to activate this console.".
# Press return.
#
wait_asc	Please press Enter to activate this console.	1min
type		"\0d"
#
# Wait for prompt.
# Type "wget http://www.uni-erlangen.de/"
# Press return.
#
wait_asc	~ #  						1min
type		"wget http://www.google.com/"
type		"\0d"
#
# Wait for prompt.
# Type "head index.html"
# Press return.
#
wait_asc	~ #  						1min
type		"grep html index.html && echo OK"
type		"\0d"
#
# Wait for "<head>" (head of HTML document).
# Power-off.
#
wait_asc	OK						1min
power_off
delay								1sec
