2 # create UML host file systems
4 # Copyright (C) 2004 Eric Marchionni, Patrik Rayo
5 # Zuercher Hochschule Winterthur
7 # This program is free software; you can redistribute it and/or modify it
8 # under the terms of the GNU General Public License as published by the
9 # Free Software Foundation; either version 2 of the License, or (at your
10 # option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
12 # This program is distributed in the hope that it will be useful, but
13 # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
14 # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19 source $DIR/function.sh
21 [ -f $DIR/../testing.conf ] || die "!! Configuration file 'testing.conf' not found."
23 source $DIR/../testing.conf
27 [ -f gentoo-fs ] || die "!! Root file system 'gentoo-fs' not found."
31 cecho-n " * Directory '$BUILDDIR' does not exist..creating.."
36 LOGFILE=${BUILDDIR}/testing.log
40 cecho-n " * Logfile '$LOGFILE' does not exist..creating.."
52 cecho-n " * Creating root filesystem for.."
56 HOSTS=$STRONGSWANHOSTS
64 cp gentoo-fs gentoo-fs-$host
65 mount -o loop gentoo-fs-$host $LOOPDIR
66 cp -rf $BUILDDIR/hosts/${host}/etc $LOOPDIR
67 if [ "$host" = "winnetou" ]
69 mkdir $LOOPDIR/var/log/apache2/ocsp
70 cp -rf $UMLTESTDIR/testing/images $LOOPDIR/var/www/localhost/htdocs
71 chroot $LOOPDIR ln -s /etc/openssl/certs /var/www/localhost/htdocs/certs
72 chroot $LOOPDIR /etc/openssl/generate-crl >> $LOGFILE 2>&1
74 chroot $LOOPDIR /etc/init.d/depscan.sh --update >> $LOGFILE 2>&1