#
# 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 Knoppix-4.0.2-CD.
#
cdrom_insert	Knoppix-4.0.2-CD
#
# Power-on node.
#
power_on
#
# Wait for boot prompt.
# Start as little services as possible.
#
wait_asc	boot:						10min
type		"knoppix 3 vga=normal nopcmcia nofirewire noaudio nodhcp\0d"
#
# Intermediate step.
#
wait_asc	INIT: Entering runlevel: 3			30min
#
# Wait for shell prompt.
#
wait_asc	root@tty1[/]#  					10min
#
# List USB devices.
# Check for "0d7d:1300 Phison Electronics Copr. Flash Disk"
#
type		"lsusb\0d"
wait_asc	0d7d:1300 Phison Electronics Corp. Flash Disk	1min
wait_asc	root@tty1[/]#  					1min
#
# Wait for shell prompt.
# Create file system on USB stick.
#
type		"mkfs -t vfat -I /dev/sda\0d"
wait_asc	root@tty1[/]#  					10min
#
# Wait for shell prompt.
# Mount USB stick, copy /etc/passwd to it, unmount it.
#
type		"mount /dev/sda /mnt\0d"
wait_asc	root@tty1[/]#  					1min
type		"cp /etc/passwd /mnt\0d"
wait_asc	root@tty1[/]#  					1min
type		"umount /mnt\0d"
wait_asc	root@tty1[/]#  					1min
