summaryrefslogtreecommitdiff
path: root/testing/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'testing/scripts')
-rwxr-xr-xtesting/scripts/build-hostconfig59
-rwxr-xr-xtesting/scripts/build-sshkeys8
-rwxr-xr-xtesting/scripts/build-umlrootfs10
-rwxr-xr-xtesting/scripts/load-testconfig6
-rwxr-xr-xtesting/scripts/restore-defaults4
5 files changed, 55 insertions, 32 deletions
diff --git a/testing/scripts/build-hostconfig b/testing/scripts/build-hostconfig
index 0df8861c8..28b321a70 100755
--- a/testing/scripts/build-hostconfig
+++ b/testing/scripts/build-hostconfig
@@ -14,7 +14,7 @@
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# for more details.
#
-# RCSID $Id: build-hostconfig,v 1.3 2005/02/08 10:40:48 as Exp $
+# RCSID $Id: build-hostconfig,v 1.4 2006/10/19 21:38:45 as Exp $
DIR=`dirname $0`
@@ -58,44 +58,61 @@ HOSTIP=`ifconfig eth0 |grep inet |sed -e "s/.*inet addr://" -e "s/ Bcast.*//"`
for host in $STRONGSWANHOSTS
do
cecho-n "${host}.."
- eval ip_${host}="`echo $HOSTNAMEIPS | sed -n -e "s/^.*${host}://gp" | awk -F : '{ print $1 }' | awk '{ print $1 }'`"
+ eval ipv4_${host}="`echo $HOSTNAMEIPV4 | sed -n -e "s/^.*${host},//gp" | awk -F, '{ print $1 }' | awk '{ print $1 }'`"
+ eval ipv6_${host}="`echo $HOSTNAMEIPV6 | sed -n -e "s/^.*${host},//gp" | awk -F, '{ print $1 }' | awk '{ print $1 }'`"
- [ "`eval echo \\\$ip_${host}`" != "$HOSTIP" ] || die "$host has the same IP as eth0 (Host)! Please change that."
+ [ "`eval echo \\\$ipv4_${host}`" != "$HOSTIP" ] || die "$host has the same IP as eth0 (Host)! Please change that."
case $host in
moon)
- eval ip1_${host}="`echo $HOSTNAMEIPS | sed -n -e "s/^.*${host}://gp" | awk -F : '{ print $2 }' | awk '{ print $1 }'`"
- [ "`eval echo \\\$ip1_${host}`" != "$HOSTIP" ] || die "eth1 of $host has the same IP as eth0 (Host)! Please change that."
- searchandreplace PH_IP_MOON $ip_moon $HOSTCONFIGDIR
- searchandreplace PH_IP1_MOON $ip1_moon $HOSTCONFIGDIR
+ eval ipv4_moon1="`echo $HOSTNAMEIPV4 | sed -n -e "s/^.*${host},//gp" | awk -F, '{ print $2 }' | awk '{ print $1 }'`"
+ [ "`eval echo \\\$ipv4_moon1`" != "$HOSTIP" ] || die "eth1 of $host has the same IP as eth0 (Host)! Please change that."
+ searchandreplace PH_IP_MOON1 $ipv4_moon1 $HOSTCONFIGDIR
+ searchandreplace PH_IP_MOON $ipv4_moon $HOSTCONFIGDIR
+ eval ipv6_moon1="`echo $HOSTNAMEIPV6 | sed -n -e "s/^.*${host},//gp" | awk -F, '{ print $2 }' | awk '{ print $1 }'`"
+ searchandreplace PH_IP6_MOON1 $ipv6_moon1 $HOSTCONFIGDIR
+ searchandreplace PH_IP6_MOON $ipv6_moon $HOSTCONFIGDIR
;;
sun)
- eval ip1_${host}="`echo $HOSTNAMEIPS | sed -n -e "s/^.*${host}://gp" | awk -F : '{ print $2 }' | awk '{ print $1 }'`"
- [ "`eval echo \\\$ip1_${host}`" != "$HOSTIP" ] || die "eth1 of $host has the same IP as eth0 (Host)! Please change that."
- searchandreplace PH_IP_SUN $ip_sun $HOSTCONFIGDIR
- searchandreplace PH_IP1_SUN $ip1_sun $HOSTCONFIGDIR
+ eval ipv4_sun1="`echo $HOSTNAMEIPV4 | sed -n -e "s/^.*${host},//gp" | awk -F, '{ print $2 }' | awk '{ print $1 }'`"
+ [ "`eval echo \\\$ipv4_sun1`" != "$HOSTIP" ] || die "eth1 of $host has the same IP as eth0 (Host)! Please change that."
+ searchandreplace PH_IP_SUN1 $ipv4_sun1 $HOSTCONFIGDIR
+ searchandreplace PH_IP_SUN $ipv4_sun $HOSTCONFIGDIR
+ eval ipv6_sun1="`echo $HOSTNAMEIPV6 | sed -n -e "s/^.*${host},//gp" | awk -F, '{ print $2 }' | awk '{ print $1 }'`"
+ searchandreplace PH_IP6_SUN1 $ipv6_sun1 $HOSTCONFIGDIR
+ searchandreplace PH_IP6_SUN $ipv6_sun $HOSTCONFIGDIR
;;
alice)
- searchandreplace PH_IP_ALICE $ip_alice $HOSTCONFIGDIR
+ searchandreplace PH_IP_ALICE $ipv4_alice $HOSTCONFIGDIR
+ searchandreplace PH_IP6_ALICE $ipv6_alice $HOSTCONFIGDIR
;;
venus)
- searchandreplace PH_IP_VENUS $ip_venus $HOSTCONFIGDIR
+ searchandreplace PH_IP_VENUS $ipv4_venus $HOSTCONFIGDIR
+ searchandreplace PH_IP6_VENUS $ipv6_venus $HOSTCONFIGDIR
;;
bob)
- searchandreplace PH_IP_BOB $ip_bob $HOSTCONFIGDIR
+ searchandreplace PH_IP_BOB $ipv4_bob $HOSTCONFIGDIR
+ searchandreplace PH_IP6_BOB $ipv6_bob $HOSTCONFIGDIR
;;
carol)
- eval ip1_${host}="`echo $HOSTNAMEIPS | sed -n -e "s/^.*${host}://gp" | awk -F : '{ print $2 }' | awk '{ print $1 }'`"
- searchandreplace PH_IP_CAROL $ip_carol $HOSTCONFIGDIR
- searchandreplace PH_IP1_CAROL $ip1_carol $HOSTCONFIGDIR
+ eval ipv4_carol1="`echo $HOSTNAMEIPV4 | sed -n -e "s/^.*${host},//gp" | awk -F, '{ print $2 }' | awk '{ print $1 }'`"
+ searchandreplace PH_IP_CAROL1 $ipv4_carol1 $HOSTCONFIGDIR
+ searchandreplace PH_IP_CAROL $ipv4_carol $HOSTCONFIGDIR
+ eval ipv6_carol1="`echo $HOSTNAMEIPV6 | sed -n -e "s/^.*${host},//gp" | awk -F, '{ print $2 }' | awk '{ print $1 }'`"
+ searchandreplace PH_IP6_CAROL1 $ipv6_carol1 $HOSTCONFIGDIR
+ searchandreplace PH_IP6_CAROL $ipv6_carol $HOSTCONFIGDIR
;;
dave)
- eval ip1_${host}="`echo $HOSTNAMEIPS | sed -n -e "s/^.*${host}://gp" | awk -F : '{ print $2 }' | awk '{ print $1 }'`"
- searchandreplace PH_IP_DAVE $ip_dave $HOSTCONFIGDIR
- searchandreplace PH_IP1_DAVE $ip1_dave $HOSTCONFIGDIR
+ eval ipv4_dave1="`echo $HOSTNAMEIPV4 | sed -n -e "s/^.*${host},//gp" | awk -F, '{ print $2 }' | awk '{ print $1 }'`"
+ searchandreplace PH_IP_DAVE1 $ipv4_dave1 $HOSTCONFIGDIR
+ searchandreplace PH_IP_DAVE $ipv4_dave $HOSTCONFIGDIR
+ eval ipv6_dave1="`echo $HOSTNAMEIPV6 | sed -n -e "s/^.*${host},//gp" | awk -F, '{ print $2 }' | awk '{ print $1 }'`"
+ searchandreplace PH_IP6_DAVE1 $ipv6_dave1 $HOSTCONFIGDIR
+ searchandreplace PH_IP6_DAVE $ipv6_dave $HOSTCONFIGDIR
;;
winnetou)
- searchandreplace PH_IP_WINNETOU $ip_winnetou $HOSTCONFIGDIR
+ searchandreplace PH_IP_WINNETOU $ipv4_winnetou $HOSTCONFIGDIR
+ searchandreplace PH_IP6_WINNETOU $ipv6_winnetou $HOSTCONFIGDIR
;;
esac
done
diff --git a/testing/scripts/build-sshkeys b/testing/scripts/build-sshkeys
index f4d584d6b..2faa3963d 100755
--- a/testing/scripts/build-sshkeys
+++ b/testing/scripts/build-sshkeys
@@ -14,7 +14,7 @@
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# for more details.
#
-# RCSID $Id: build-sshkeys,v 1.2 2005/02/15 14:12:16 as Exp $
+# RCSID $Id: build-sshkeys,v 1.3 2006/10/19 21:38:45 as Exp $
DIR=`dirname $0`
@@ -58,10 +58,10 @@ else
cecho "done"
fi
-for host in $HOSTNAMEIPS
+for host in $HOSTNAMEIPV4
do
- HOSTNAME=`echo $host | awk -F : '{ print $1 }'`
- IP=`echo $host | awk -F : '{ print $2 }'`
+ HOSTNAME=`echo $host | awk -F, '{ print $1 }'`
+ IP=`echo $host | awk -F, '{ print $2 }'`
if [ `grep "$IP " ~/.ssh/known_hosts | wc -l` != "0" ]
then
cecho "!! Warning: An entry exists for the following IP address: $IP"
diff --git a/testing/scripts/build-umlrootfs b/testing/scripts/build-umlrootfs
index ba103838f..1d534c81b 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.11 2006/01/08 22:29:56 as Exp $
+# RCSID $Id: build-umlrootfs,v 1.12 2006/10/20 14:26:05 as Exp $
DIR=`dirname $0`
@@ -91,6 +91,12 @@ cecho "done"
######################################################
+# remove /etc/resolv.conf
+#
+cecho " * Removing /etc/resolv.conf"
+rm -f $LOOPDIR/etc/resolv.conf
+
+######################################################
# copying default /etc/hosts to the root filesystem
#
cecho " * Copying '$HOSTCONFIGDIR/default/etc/hosts' to the root filesystem"
@@ -153,7 +159,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
diff --git a/testing/scripts/load-testconfig b/testing/scripts/load-testconfig
index 89da17e72..9c0477e54 100755
--- a/testing/scripts/load-testconfig
+++ b/testing/scripts/load-testconfig
@@ -14,7 +14,7 @@
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# for more details.
#
-# RCSID $Id: load-testconfig,v 1.2 2004/12/13 21:02:42 as Exp $
+# RCSID $Id: load-testconfig,v 1.3 2006/10/19 21:38:45 as Exp $
DIR=`dirname $0`
@@ -46,7 +46,7 @@ if [ -d $TESTSDIR/$testname/hosts ]
then
for host in `ls $TESTSDIR/$testname/hosts`
do
- eval HOSTLOGIN="root@`echo $HOSTNAMEIPS | sed -n -e "s/^.*${host}://gp" | awk -F : '{ print $1 }' | awk '{ print $1 }'`"
+ eval HOSTLOGIN="root@`echo $HOSTNAMEIPV4 | sed -n -e "s/^.*${host},//gp" | awk -F, '{ print $1 }' | awk '{ print $1 }'`"
scp -rp $TESTSDIR/$testname/hosts/$host/etc $HOSTLOGIN:/ > /dev/null 2>&1
done
fi
@@ -58,7 +58,7 @@ fi
for host in $IPSECHOSTS
do
- eval HOSTLOGIN="root@`echo $HOSTNAMEIPS | sed -n -e "s/^.*${host}://gp" | awk -F : '{ print $1 }' | awk '{ print $1 }'`"
+ eval HOSTLOGIN="root@`echo $HOSTNAMEIPV4 | sed -n -e "s/^.*${host},//gp" | awk -F, '{ print $1 }' | awk '{ print $1 }'`"
ssh $HOSTLOGIN 'rm -f /var/log/auth.log; \
kill -SIGHUP `cat /var/run/syslogd.pid`' > /dev/null 2>&1
done
diff --git a/testing/scripts/restore-defaults b/testing/scripts/restore-defaults
index 129e46f56..03f723e82 100755
--- a/testing/scripts/restore-defaults
+++ b/testing/scripts/restore-defaults
@@ -14,7 +14,7 @@
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# for more details.
#
-# RCSID $Id: restore-defaults,v 1.2 2004/12/20 07:56:33 as Exp $
+# RCSID $Id: restore-defaults,v 1.3 2006/10/19 21:40:27 as Exp $
DIR=`dirname $0`
@@ -47,7 +47,7 @@ if [ -d $TESTSDIR/${testname}/hosts ]
then
for host in `ls $TESTSDIR/${testname}/hosts`
do
- eval HOSTLOGIN="root@`echo $HOSTNAMEIPS | sed -n -e "s/^.*${host}://gp" | awk -F : '{ print $1 }' | awk '{ print $1 }'`"
+ eval HOSTLOGIN="root@`echo $HOSTNAMEIPV4 | sed -n -e "s/^.*${host},//gp" | awk -F, '{ print $1 }' | awk '{ print $1 }'`"
scp -rp $HOSTCONFIGDIR/${host}/etc $HOSTLOGIN:/ > /dev/null 2>&1
done
fi