#
# 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 NetBSD-2.0.2 CD
#
cdrom_insert	NetBSD-2.0.2-CD-1
#
# Power-on node.
#
power_on
#
# Intermediate step.
#
wait_asc	booting fd0a				1min
wait_asc	init: Creating mfs /dev			3min
#
# Wait for "Welcome to sysinst, ..." ("Installation messages in English").
# Use preselected "Installation messages in English".
#
wait_asc	Installation messages in English	5min
type		"\0d"
#
# Wait for "Welcome to sysinst, ..." ("NetBSD-2.0.2 Install System").
# Use preselected "Install NetBSD to hard disk".
#
wait_asc	NetBSD-2.0.2 Install System		1min
type		"\0d"
#
# Wait for "You have chosen to install NetBSD...".
# Use "Yes".
#
wait_asc	You have chosen to install NetBSD	1min
type		"\1f"
type		"\0d"
#
# Wait for "I found only one disk, wd0."
# Use preselected "Hit enter to continue".
#
wait_asc	I found only one disk, wd0.		1min
type		"\0d"
#
# Wait for "NetBSD distribution is broken into a...".
# Use preselected "Full installation".
#
wait_asc	NetBSD distribution is broken into a	1min
type		"\0d"
#
# Wait for "This disk matches the following BIOS disk:"
# Use preselected "This is the correct geometry"
#
wait_asc	This disk matches the following BIOS	1min
type		"\0d"
#
# Wait for "We are now going to install NetBSD...".
# Use preselected "Edit the MBR partition table".
#
wait_asc	We are now going to install NetBSD	1min
type		"\0d"
#
# Wait for "You have elected to specify partition...".
# Use preselected "Megabytes".
#
wait_asc	You have elected to specify partition	1min
type		"\0d"
#
# Wait for "The Current MBR partition table is shown..."
# Use preselected "a: unused".
#
wait_asc	The Current MBR partition table is	1min
type		"\0d"
#
# Wait for "kind: unused".
# Use preselected "kind: unused".
#
wait_asc	kind: unused				1min
type		"\0d"
#
# Wait for "c: NetBSD".
# Use preselected "c: NetBSD".
#
wait_asc	c: NetBSD				1min
type		"c"
type		"\0d"
#
# Wait for "install: No".
# Use "install: Yes".
#
wait_asc	install: No				1min
type		"f"
type		"\0d"
#
# Wait for "Partition OK".
# Use "Partition OK".
#
wait_asc	Partition OK				1min
type		"x"
type		"\0d"
#
# Wait for "Partition table OK".
# Use "Partition table OK".
#
wait_asc	Partition table OK			1min
type		"x"
type		"\0d"
#
# Wait for "The bootcode in the Master Boot Record..."
# Use preselected "Yes".
#
wait_asc	The bootcode in the Master Boot Record	1min
type		"\0d"
#
# Wait for "NetBSD uses a BSD disklabel to carve..."
# Use preselected "Set sizes of NetBSD partitions".
#
wait_asc	NetBSD uses a BSD disklabel to carve	1min
type		"\0d"
#
# Wait for "You can now change the sizes for the system..."
# Use "Accept partition sizes...".
#
wait_asc	You can now change the sizes for the	1min
type		"\1f"
type		"\1f"
type		"\1f"
type		"\1f"
type		"\1f"
type		"\1f"
type		"\1f"
type		"\1f"
type		"\0d"
#
# Wait for "We now have your BSD-disklabel partitions as:"
# Use preselected "Partition sizes ok".
#
wait_asc	We now have your BSD-disklabel		1min
type		"\0d"
#
# Wait for "Please enter a name for your NetBSD disk..."
# Use preselected "FAUmachine IDE".
#
wait_asc	Please enter a name for your NetBSD	1min
type		"\0d"
#
# Wait for "Ok, we are now ready to install NetBSD..."
# Use "Yes".
#
wait_asc	Ok, we are now ready to install NetBSD	1min
type		"\1f"
type		"\0d"
#
# Wait for "Would you like to install the normal..."
# Use preselected "Use BIOS console".
#
wait_asc	Would you like to install the normal	1min
type		"\0d"
type		"\0d"
#
# Wait for "Okay, the first part of the procedure is..."
# Use preselected "Progress bar (recommended)".
#
wait_asc	Okay, the first part of the procedure	1min
type		"\0d"
#
# Wait for "Your disk is now ready for installing..."
# Use "CD-ROM / DVD".
#
wait_asc	Your disk is now ready for installing	1min
type		"\1f"
type		"\1f"
type		"\0d"
#
# Wait for "Enter the CDROM device to be used..."
# Use "Continue".
#
wait_asc	Enter the CDROM device to be used	1min
type		"\1f"
type		"\1f"
type		"\0d"
#
# Intermediate steps.
#
wait_asc	base.tgz				20min
# wait_asc	etc.tgz					20min
wait_asc	comp.tgz				20min
wait_asc	games.tgz				20min
wait_asc	man.tgz					20min
wait_asc	misc.tgz				20min
wait_asc	text.tgz				20min
wait_asc	xbase.tgz				20min
wait_asc	xcomp.tgz				20min
# wait_asc	xetc.tgz				20min
wait_asc	xfont.tgz				20min
wait_asc	xserver.tgz				20min
#
# Wait for "All selected distribution sets unpacked successfully."
# Use only "Hit enter to continue".
#
wait_asc	All selected distribution sets		3min
type		"\0d"
#
# Intermediate step.
#
wait_asc	Making device nodes			1min
#
# Wait for "The extraction of the selected sets...".
# Use only "Hit enter to continue".
# 
wait_asc	The extraction of the selected sets	1min
type		"\0d"
#
# Wait for "Please choose the timezone...".
# Use "Europe".
# Use "Berlin".
# Use "Back to main timezone list"
# Use "Exit"
# 
wait_asc	Please choose the timezone		1min
type		">"
type		"\1f"
type		"\1f"
type		"\1f"
type		"\1f"
type		"\1f"
type		"\1f"
type		"\1f"
wait_asc	>Europe/				1min
type		"\0d"
type		"\1f"
type		"\1f"
type		"\1f"
type		"\1f"
type		"\1f"
type		"\1f"
wait_asc	>Europe/Berlin				1min
type		"\0d"
type		"\1e"
type		"\1e"
type		"\1e"
type		"\1e"
type		"\1e"
type		"\1e"
wait_asc	> Back to main timezone list		1min
type		"\0d"
wait_asc	>Europe/				1min
type		">"
type		">"
type		">"
type		">"
wait_asc	>Exit					1min
type		"\0d"
#
# Wait for "Please choose the password cipher to use.".
# Use preselected "DES".
#
wait_asc	Please choose the password cipher to	1min
type		"\0d"
#
# Wait for "The root password of the newly installed...".
# Use preselected "Yes".
#
wait_asc	The root password of the newly		1min
type		"\0d"
#
# Wait for "Changing local password for root.".
# Type "WeV0te4u!".
# Type "WeV0te4u!".
#
wait_asc	New password:				1min
type		"WeV0te4u!\0d"
wait_asc	Retype new password:			1min
type		"WeV0te4u!\0d"
wait_asc	Hit enter to continue			1min
type		"\0d"
#
# Wait for "You can now select which shell to use for...".
# Use preselected "/bin/csh".
#
wait_asc	You can now select which shell to	1min
type		"\0d"
#
# Wait for "The installation of NetBSD-2.0.2 is now complete.".
# Use only "Hit enter to continue".
#
wait_asc	The installation of NetBSD-2.0.2	1min
type		"\0d"
#
# Wait for "NetBSD-2.0.2 Install System".
# Remove CDROM.
# Use "Reboot the computer".
#
wait_asc	NetBSD-2.0.2 Install System		1min
cdrom_remove
type		"\1f"
type		"\1f"
type		"\1f"
type		"\0d"
#
# Wait for "login:".
# Type "root".
# Wait for "Password:".
# Type "WeV0te4u!".
#
wait_asc	login:					3min
type		"root\0d"
wait_asc	Password:				1min
type		"WeV0te4u!\0d"
#
# Wait for "#".
# Type "halt".
#
wait_asc	#					1min
type		"halt\0d"
#
# Wait for "Please press any key to reboot".
# Power-off.
# Finished.
#
wait_asc	Please press any key to reboot		1min
power_off
delay							1sec
