aboutsummaryrefslogtreecommitdiffstats
path: root/testing/scripts/build-umlhostfs
diff options
context:
space:
mode:
authorReto Buerki <reet@codelabs.ch>2012-11-19 10:43:42 +0100
committerTobias Brunner <tobias@strongswan.org>2012-12-18 16:00:21 +0100
commitaa5803e0e3368172d7674ff760983c568118df16 (patch)
tree000b01af72c7a8599c066224c7c819540124f428 /testing/scripts/build-umlhostfs
parent0080daa78789bb7012bc0f80dd6b4ff0d47e41a3 (diff)
downloadstrongswan-aa5803e0e3368172d7674ff760983c568118df16.tar.bz2
strongswan-aa5803e0e3368172d7674ff760983c568118df16.tar.xz
testing: Switch to Debian based guest images
Instead of extracting a downloaded Gentoo filesystem tree into a file containing a reiserfs filesystem, create an ext3 filesystem inside a sparse file, mount it and debootstrap an up-to-date Debian system. Use this image as base for all UML guest images. Also, drop support for the various consoles and use xterm unconditionally.
Diffstat (limited to 'testing/scripts/build-umlhostfs')
-rwxr-xr-xtesting/scripts/build-umlhostfs33
1 files changed, 14 insertions, 19 deletions
diff --git a/testing/scripts/build-umlhostfs b/testing/scripts/build-umlhostfs
index 75feaa4ed..9c309f545 100755
--- a/testing/scripts/build-umlhostfs
+++ b/testing/scripts/build-umlhostfs
@@ -23,8 +23,9 @@ source $DIR/function.sh
source $DIR/../testing.conf
cd $BUILDDIR/root-fs
+BASE=$BUILDDIR/base.img
-[ -f gentoo-fs ] || die "!! Root file system 'gentoo-fs' not found."
+[ -f $BASE ] || die "!! Base image $BASE not found."
if [ ! -d $BUILDDIR ]
then
@@ -33,17 +34,6 @@ then
cgecho "done"
fi
-LOGFILE=${BUILDDIR}/testing.log
-
-if [ ! -f $LOGFILE ]
-then
- cecho-n " * Logfile '$LOGFILE' does not exist..creating.."
- touch $LOGFILE
- cgecho "done"
-fi
-
-LOOPDIR=loop
-
if [ ! -d $LOOPDIR ]
then
mkdir $LOOPDIR
@@ -61,17 +51,22 @@ fi
for host in $HOSTS
do
cecho-n "$host.."
- cp gentoo-fs gentoo-fs-$host
- mount -o loop gentoo-fs-$host $LOOPDIR
+ cp $BASE $host.img
+ mount -o loop $host.img $LOOPDIR
cp -rf $BUILDDIR/hosts/${host}/etc $LOOPDIR
if [ "$host" = "winnetou" ]
then
- mkdir $LOOPDIR/var/log/apache2/ocsp
- cp -rf $UMLTESTDIR/testing/images $LOOPDIR/var/www/localhost/htdocs
- chroot $LOOPDIR ln -s /etc/openssl/certs /var/www/localhost/htdocs/certs
- chroot $LOOPDIR /etc/openssl/generate-crl >> $LOGFILE 2>&1
+ mkdir $LOOPDIR/var/log/apache2/ocsp
+ cp -rf $UMLTESTDIR/testing/images $LOOPDIR/var/www/
+ chroot $LOOPDIR ln -s /etc/openssl/certs /var/www/certs
+ chroot $LOOPDIR /etc/openssl/generate-crl >> $LOGFILE 2>&1
+ chroot $LOOPDIR update-rc.d apache2 defaults >> $LOGFILE 2>&1
+ chroot $LOOPDIR update-rc.d slapd defaults >> $LOGFILE 2>&1
+ chroot $LOOPDIR rm -rf /var/lib/ldap/*
+ chroot $LOOPDIR slapadd -l /etc/ldap/ldif.txt -f /etc/ldap/slapd.conf >> $LOGFILE 2>&1
+ chroot $LOOPDIR chown -R openldap:openldap /var/lib/ldap >> $LOGFILE 2>&1
fi
- chroot $LOOPDIR /etc/init.d/depscan.sh --update >> $LOGFILE 2>&1
+ sync
umount $LOOPDIR
done