if [ ! $2 ]
then
	logfile="/root/status"
else
	logfile="$2"
fi
if [ ! $1 ]
then
	kernel="gentoo-sources"
else
	kernel="$1"
fi
echo "Beginn Installation with kernel sys-kernel/$kernel" >> $logfile
echo "Beginn Installation with kernel sys-kernel/$kernel"
echo "Beginn Bootstrap" >> $logfile
echo "Beginn Bootstrap"
date >> $logfile
date
cd /usr/portage
scripts/bootstrap.sh
echo "Beginn \"emerge system\"" >> $logfile
echo "Beginn \"emerge system\""
date >> $logfile
date
if [ $3 ]
	cp "$3" /etc/make.conf
fi
emerge system
echo "Beginn \"emerge sync\"" >> $logfile
echo "Beginn \"emerge sync\""
date >> $logfile
date
emerge sync
echo "Beginn \"emerge -u world\"" >> $logfile
echo "Beginn \"emerge -u world\""
date >> $logfile
date
emerge -u world
echo "Beginn \"emerge sys-kernel/$kernel\"" >> $logfile
echo "Beginn \"emerge sys-kernel/$kernel\""
date >> $logfile
date
emerge sys-kernel/$kernel
echo "Finished" >> $logfile
echo "Finished"
date >> $logfile
date
