diff options
Diffstat (limited to 'testing/scripts/build-umlrootfs')
-rwxr-xr-x | testing/scripts/build-umlrootfs | 33 |
1 files changed, 23 insertions, 10 deletions
diff --git a/testing/scripts/build-umlrootfs b/testing/scripts/build-umlrootfs index 1d534c81b..f839e3e8e 100755 --- a/testing/scripts/build-umlrootfs +++ b/testing/scripts/build-umlrootfs @@ -14,7 +14,7 @@ # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License # for more details. # -# RCSID $Id: build-umlrootfs,v 1.12 2006/10/20 14:26:05 as Exp $ +# RCSID $Id: build-umlrootfs,v 1.11 2006/01/08 22:29:56 as Exp $ DIR=`dirname $0` @@ -89,7 +89,6 @@ mount -o loop gentoo-fs $LOOPDIR >> $LOGFILE 2>&1 tar xjpf $ROOTFS -C $LOOPDIR >> $LOGFILE 2>&1 cecho "done" - ###################################################### # remove /etc/resolv.conf # @@ -102,14 +101,21 @@ rm -f $LOOPDIR/etc/resolv.conf 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 @@ -120,20 +126,27 @@ 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" >> $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 cecho-n " * Compiling $STRONGSWANVERSION within the root file system as chroot.." chroot $LOOPDIR /bin/bash /install.sh >> $LOGFILE 2>&1 @@ -159,7 +172,7 @@ cp $LOOPDIR/etc/ssh/ssh_host_rsa_key $LOOPDIR/root/.ssh/id_rsa for host in $STRONGSWANHOSTS do - eval ip="`echo $HOSTNAMEIPV4 | 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 |