#!/bin/bash read -p 'Re-Install Windows XP from image [yes/no]: ' in if [ "$in" != "yes" -a "$in" != "zes" ]; then echo "You did not type 'yes' or 'zes'." exit 0 fi umount /dev/sda1 echo; echo "Writing Windows XP image to /dev/sda1 ..." cat `ls /mnt/sda2/system/sda1-image/diskimg.*` | \ gunzip -3 | ./statuscat > /dev/sda1 echo; echo "Writing Windows XP image to /dev/sda1 (sync) ..." sync echo; echo "READY." /sbin/reboot