X-Git-Url: https://git.strongswan.org/?p=strongswan.git;a=blobdiff_plain;f=testing%2Fscripts%2Fbuild-umlrootfs;h=5c35185d96fcde30d35c9e11bf216baa23997bb7;hp=c2726cfc9bc8de4f1a79af23bb6ef52ba25e43ee;hb=c796659f23efef7eee6d1e89ae560683ffa6cdcf;hpb=9820c0e208fa5c7467fb89b1bda86ced6962e02f diff --git a/testing/scripts/build-umlrootfs b/testing/scripts/build-umlrootfs index c2726cf..5c35185 100755 --- a/testing/scripts/build-umlrootfs +++ b/testing/scripts/build-umlrootfs @@ -89,21 +89,27 @@ mount -o loop gentoo-fs $LOOPDIR >> $LOGFILE 2>&1 tar xjpf $ROOTFS -C $LOOPDIR >> $LOGFILE 2>&1 cecho "done" - ###################################################### # copying default /etc/hosts to the root filesystem # cecho " * Copying '$HOSTCONFIGDIR/default/etc/hosts' to the root filesystem" cp -fp $HOSTCONFIGDIR/default/etc/hosts $LOOPDIR/etc/hosts -# ##################################################### # extracting strongSwan into the root filesystem # - cecho " * Extracting strongSwan into the root filesystem" tar xjf $STRONGSWAN -C $LOOPDIR/root >> $LOGFILE 2>&1 +###################################################### +# setting up mountpoint for shared source tree +# +if [ "${SHAREDTREE+set}" = "set" ]; then + cecho " * setting up shared strongswan tree at '$SHAREDTREE'" + mkdir $LOOPDIR/root/strongswan-shared + echo "" >> $LOOPDIR/etc/fstab + echo "none /root/strongswan-shared hostfs $SHAREDTREE" >> $LOOPDIR/etc/fstab +fi ###################################################### # installing strongSwan and setting the local timezone @@ -114,19 +120,25 @@ INSTALLSHELL=${LOOPDIR}/install.sh cecho " * Preparing strongSwan installation script" echo "ln -sf /usr/share/zoneinfo/${TZUML} /etc/localtime" >> $INSTALLSHELL +echo "cd /root/${STRONGSWANVERSION}" >> $INSTALLSHELL +echo -n "./configure --sysconfdir=/etc" >> $INSTALLSHELL +echo -n " --with-random-device=/dev/urandom" >> $INSTALLSHELL if [ "$USE_LIBCURL" = "yes" ] then - echo "export USE_LIBCURL=true" >> $INSTALLSHELL + echo -n " --enable-http" >> $INSTALLSHELL fi if [ "$USE_LDAP" = "yes" ] then - echo "export USE_LDAP=true" >> $INSTALLSHELL + echo -n " --enable-ldap=3" >> $INSTALLSHELL fi -echo "export USERCOMPILE=\'-DRANDOM_DEVICE=\\\"/dev/urandom\\\"\'" >> $INSTALLSHELL -echo "cd /root/${STRONGSWANVERSION}" >> $INSTALLSHELL -echo "make programs" >> $INSTALLSHELL +if [ "$USE_LEAK_DETECTIVE" = "yes" ] +then + echo -n " --enable-leak-detective" >> $INSTALLSHELL +fi +echo "" >> $INSTALLSHELL +echo "make" >> $INSTALLSHELL echo "make install" >> $INSTALLSHELL echo "ldconfig" >> $INSTALLSHELL @@ -154,7 +166,7 @@ cp $LOOPDIR/etc/ssh/ssh_host_rsa_key $LOOPDIR/root/.ssh/id_rsa for host in $STRONGSWANHOSTS do - eval ip="`echo $HOSTNAMEIPS | sed -n -e "s/^.*${host}://gp" | awk -F : '{ print $1 }' | awk '{ print $1 }'`" + eval ip="`echo $HOSTNAMEIPV4 | sed -n -e "s/^.*${host},//gp" | awk -F- '{ print $1 }' | awk '{ print $1 }'`" echo "$host,$ip `cat $HOSTCONFIGDIR/ssh_host_rsa_key.pub`" >> $LOOPDIR/root/.ssh/known_hosts echo "`cat $HOSTCONFIGDIR/ssh_host_rsa_key.pub` root@$host" >> $LOOPDIR/root/.ssh/authorized_keys done