#
# 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 RedHat-9-CD-1.
#
cdrom_insert	RedHat-9-CD-1
#
# Power-on node.
#
power_on
#
# Wait for boot prompt.
#
wait_asc	boot:			3min
type		"linux text\0d"
#
# Wait for loader message.
#
wait_asc	running /sbin/loader	2min
#
# Wait for media test screen.
#
wait_asc	testing the CD		2min
type		"\1d"
type		"\0d"
#
# Wait for installer message.
#
wait_asc	Running anaconda	2min
#
# Wait for Welcome screen.
#
wait_asc	www.redhat.com		2min
type		"\0d"
#
# Wait for Language selection screen.
#
wait_asc	Language Selection	1min
type		"\0d"
#
# Wait for Keyboard selection screen.
#
wait_asc	Keyboard Selection	1min
type		"\0d"
#
# Wait for Mouse selection screen.
#
wait_asc	Mouse Selection		1min
type		"\09"
type		"\09"
type		"\0d"
#
# Wait for "Installation Type" screen.
# Use "Personal Desktop".
#
wait_asc	Installation Type	1min
type		"\0d"
#
# Wait for Disk Partitioning Setup
# Use "Disk Druid".
#
wait_asc	Disk Partitioning Setup	1min
type		"\09"
type		"\0d"
#
# Wait for "Warning".
# Use "Yes".
#
wait_asc	Warning			1min
type		"\0d"
#
# Wait for "Partitioning".
# Select "Free space" and use "New".
#
wait_asc	Partitioning		1min
type		"\1f"
type		"\09"
type		"\0d"
#
# Wait for "Add Partition".
# Use "Mount Point" "/",
# Use "File System type" "ext2",
# Use "Allowable Drives" "hda",
# Use "Size" "3800"
# ...
#
wait_asc	Add Partition		1min
type		"/"
type		"\09"
type		"\09"
type		"\09"
type		"\08"
type		"3800"
type		"\09"
type		"\09"
type		"\09"
type		"\09"
type		" "
type		"\09"
type		"\09"
type		"\0d"
#
# Wait for "Warning".
# Use "Add anyway".
#
wait_asc	Warning			1min
type		"\09"
type		"\0d"
#
# Wait for "Partitioning".
# Use "New".
#
wait_asc	Partitioning		1min
type		"\0d"
#
# Wait for "Add Partition".
# Use "File System type" "swap",
# Use "Allowable Drives" "hda",
# Use "Size" "200"
# ...
#
wait_asc	Add Partition		1min
type		"\09"
type		"\1f"
type		"\1f"
type		"\1f"
type		"\09"
type		"\09"
type		"\08"
type		"200"
type		"\09"
type		"\09"
type		"\09"
type		" "
type		"\09"
type		" "
type		"\09"
type		"\09"
type		"\0d"
#
# Wait for "Partitioning".
# Use "OK".
#
wait_asc	Partitioning		1min
type		"\09"
type		"\09"
type		"\09"
type		"\09"
type		"\0d"
#
# Wait for "Boot Loader Configuration".
# Use "OK".
#
wait_asc	Boot Loader Configuration	1min
type		"\09"
type		"\09"
type		"\09"
type		"\0d"
#
# Wait for "kernel options"
# Use "OK" (no special options)
#
wait_asc	pass special options		1min
type		"\09"
type		"\09"
type		"\0d"
#
# Wait for "Boot Loader Password".
# Don't set a password.
#
wait_asc	boot loader password		1min
type		"\09"
type		"\0d"
#
# Wait for "what partitions to boot?"
# Use "OK"/standard variant hda1
#
wait_asc	be able to boot and what label	1min
type		"\09"
type		"\0d"
#
# Wait for "Boot Loader Configuration" "Where do you want..."
# Use "OK"
#
wait_asc	Where do you want to install	1min
type		"\09"
type		"\0d"
#
# Wait for "Network Contiguration for eth0".
# Use "OK"
#
wait_asc	Network Configuration for eth0	1min
type		"\09"
type		"\09"
type		"\0d"
#
# Wait for "Firewall Configuration".
# Use "OK"
#
wait_asc	Firewall Configuration		1min
type		"\0d"
#
# Wait for "Language Support".
# Use "OK"
#
wait_asc	Language Support		1min
type		"\09"
type		"\0d"
#
# Wait for "Time Zone Selection".
# Use "Hardware clock set to GMT".
# Use "MET".
# Use "OK".
#
wait_asc	Time Zone Selection		1min
type		" "
type		"\09"
type		"M"
type		"\09"
type		"\0d"
#
# Wait for "Root Password".
# Type "WeV0te4u!" twice.
# Use "OK".
#
wait_asc	Root Password			1min
type		"WeV0te4u!"
type		"\09"
type		"WeV0te4u!"
type		"\09"
type		"\0d"
#
# Wait for "Workstation Defaults".
# Use "OK".
#
wait_asc	Workstation Defaults		3min
type		"\09"
type		"\0d"
#
# Wait for "Installation to begin".
# Use "OK".
#
wait_asc	Installation to begin		1min
type		"\0d"
#
# Intermediate steps during installation...
#
wait_asc	Formatting			2min
wait_asc	Copying File			2min
wait_asc	Processing			2min
wait_asc	Install Starting		2min
wait_asc	Processing			2min
wait_asc	Package Installation		2min
#
# Wait for "Change CDROM" ("disk 2").
# Change CDROM (use disk 2) and use "OK".
#
wait_asc	disc 2				2hr
cdrom_remove
cdrom_insert	RedHat-9-CD-2
type		"\0d"
#
# Wait for "Change CDROM" ("disk 3").
# Change CDROM (use disk 3) and use "OK".
#
wait_asc	disc 3				2hr
cdrom_remove
cdrom_insert	RedHat-9-CD-3
type		"\0d"
#
# Intermediate steps during installation...
#
# wait_asc	?				1min
wait_asc	Bootloader			1min
#
# Wait for "Boot Diskette".
# Use "No".
#
wait_asc	Boot Diskette			1min
type		"\09"
type		"\0d"
#
# Wait for "Video Card Configuration".
# Use "Skip X Configuration".
#
wait_asc	Video Card Configuration	1min
type		"\09"
type		"\09"
type		"\09"
type		"\0d"
#
# Wait for "Complete".
# Use "Ok".
#
wait_asc	Complete			1min
type		"\0d"
#
# Node will reboot...
#
# Just wait...
#
# Wait for "login:".
# Enter "root".
#
wait_asc	login:				3min
type		"root\0d"
#
# Wait for "Password:".
# Enter "root".
#
wait_asc	Password:			1min
type		"WeV0te4u!\0d"
#
# Wait for "root@localhost".
# Enter "halt".
#
wait_asc	root@localhost			1min
type		"halt\0d"
#
# Wait for "System halted".
# Enter "halt".
#
wait_asc	System halted			1min
