# This script may be used from the rescue environment
# for the purpose of dumping the following images to a
# harddrive.
# Uncomment the SCSI lines if you are on a SCSI system.
# Author: Randolph R. Russell
# $Id: bootme,v 1.1.2.1 2007/07/24 15:43:18 jhoffman Exp $

case $1 in
	"ks")
		IMAGE="ksnet.img"
		SAY="kickstart"
	;;
	"rs")
		IMAGE="rsnet.img"
		SAY="rescue"
	;;
	"bs")
		IMAGE="bsnet.img"
		SAY="bootnet"
	;;
	*)
		cat <<EOF
		Usage:  bootme <image type>
		Running this script will render the current installation
		unusable.  DO NOT EXECUTE IF YOU ARE NOT RUNNING THIS CLASS
		EOF
	;;
esac
# RHCX:  Edit the following line for SCSI systems
DEVICE=/dev/hda
mknod ${DEVICE}
dd if=/dev/zero of=${DEVICE} count=1
cat /mnt/source/images/${IMAGE} > ${DEVICE} 2>/dev/null
echo "You can now exit, reset or power-cycle to ${SAY} the system."
