Some whitespace fixes

Didn't change some of the larger testing scripts that use an inconsistent
indentation style.
This commit is contained in:
Tobias Brunner
2019-08-22 15:18:06 +02:00
parent 68346b6962
commit b9949e98c2
92 changed files with 554 additions and 552 deletions
+2 -2
View File
@@ -29,8 +29,8 @@ strongswan_STARTER_PLUGINS := kernel-netlink
# list of all plugins - used to enable them with the function below # list of all plugins - used to enable them with the function below
strongswan_PLUGINS := $(sort $(strongswan_CHARON_PLUGINS) \ strongswan_PLUGINS := $(sort $(strongswan_CHARON_PLUGINS) \
$(strongswan_STARTER_PLUGINS) \ $(strongswan_STARTER_PLUGINS) \
$(strongswan_SCEPCLIENT_PLUGINS)) $(strongswan_SCEPCLIENT_PLUGINS))
include $(LOCAL_PATH)/Android.common.mk include $(LOCAL_PATH)/Android.common.mk
+8 -6
View File
@@ -26,19 +26,21 @@ libimcv.plugins.imc-attestation.pcr_info = no
Whether to send pcr_before and pcr_after info. Whether to send pcr_before and pcr_after info.
libimcv.plugins.imc-attestation.pcr17_before = libimcv.plugins.imc-attestation.pcr17_before =
PCR17 value before measurement. PCR17 value before measurement.
libimcv.plugins.imc-attestation.pcr17_meas = libimcv.plugins.imc-attestation.pcr17_meas =
Dummy measurement value extended into PCR17 if the TBOOT log is not available. Dummy measurement value extended into PCR17 if the TBOOT log is not
available.
libimcv.plugins.imc-attestation.pcr17_after = libimcv.plugins.imc-attestation.pcr17_after =
PCR17 value after measurement. PCR17 value after measurement.
libimcv.plugins.imc-attestation.pcr18_before = libimcv.plugins.imc-attestation.pcr18_before =
PCR18 value before measurement. PCR18 value before measurement.
libimcv.plugins.imc-attestation.pcr18_meas = libimcv.plugins.imc-attestation.pcr18_meas =
Dummy measurement value extended into PCR17 if the TBOOT log is not available. Dummy measurement value extended into PCR17 if the TBOOT log is not
available.
libimcv.plugins.imc-attestation.pcr18_after = libimcv.plugins.imc-attestation.pcr18_after =
PCR18 value after measurement. PCR18 value after measurement.
+1 -1
View File
@@ -6,7 +6,7 @@ libimcv.plugins.imc-hcd.subtypes
libimcv.plugins.imc-hcd.subtypes.<section> libimcv.plugins.imc-hcd.subtypes.<section>
Defines a PWG HCD PA subtype section. Recognized subtype section names are Defines a PWG HCD PA subtype section. Recognized subtype section names are
_system_, _control_, _marker_, _finisher_, _interface_ and _scanner_. _system_, _control_, _marker_, _finisher_, _interface_ and _scanner_.
libimcv.plugins.imc-hcd.subtypes.<section>.attributes_natural_language = en libimcv.plugins.imc-hcd.subtypes.<section>.attributes_natural_language = en
Variable length natural language tag conforming to RFC 5646 specifies Variable length natural language tag conforming to RFC 5646 specifies
+4 -4
View File
@@ -1,18 +1,18 @@
libimcv.plugins.imc-os.device_cert = libimcv.plugins.imc-os.device_cert =
Manually set the path to the client device certificate Manually set the path to the client device certificate
(e.g. /etc/pts/aikCert.der) (e.g. /etc/pts/aikCert.der)
libimcv.plugins.imc-os.device_id = libimcv.plugins.imc-os.device_id =
Manually set the client device ID in hexadecimal format Manually set the client device ID in hexadecimal format
(e.g. 1083f03988c9762703b1c1080c2e46f72b99cc31) (e.g. 1083f03988c9762703b1c1080c2e46f72b99cc31)
libimcv.plugins.imc-os.device_handle = libimcv.plugins.imc-os.device_handle =
Manually set handle to a private key bound to a smartcard or TPM Manually set handle to a private key bound to a smartcard or TPM
(e.g. 0x81010004) (e.g. 0x81010004)
libimcv.plugins.imc-os.device_pubkey = libimcv.plugins.imc-os.device_pubkey =
Manually set the path to the client device public key Manually set the path to the client device public key
(e.g. /etc/pts/aikPub.der) (e.g. /etc/pts/aikPub.der)
libimcv.plugins.imc-os.push_info = yes libimcv.plugins.imc-os.push_info = yes
Send operating system info without being prompted. Send operating system info without being prompted.
+3 -3
View File
@@ -5,10 +5,10 @@ charon.plugins.tnccs-20.max_message_size = 65490
Maximum size of a PA-TNC message (upper limit via PT-EAP = 65497). Maximum size of a PA-TNC message (upper limit via PT-EAP = 65497).
charon.plugins.tnccs-20.mutual = no charon.plugins.tnccs-20.mutual = no
Enable PB-TNC mutual protocol. Enable PB-TNC mutual protocol.
charon.plugins.tnccs-20.tests.pb_tnc_noskip = no charon.plugins.tnccs-20.tests.pb_tnc_noskip = no
Send an unsupported PB-TNC message type with the NOSKIP flag set. Send an unsupported PB-TNC message type with the NOSKIP flag set.
charon.plugins.tnccs-20.tests.pb_tnc_version = 2 charon.plugins.tnccs-20.tests.pb_tnc_version = 2
Send a PB-TNC batch with a modified PB-TNC version. Send a PB-TNC batch with a modified PB-TNC version.
+23 -23
View File
@@ -1,7 +1,7 @@
conftest - an IKEv2 conformance testing framework conftest - an IKEv2 conformance testing framework
================================================= =================================================
1. Introduction 1. Introduction
@@ -40,9 +40,9 @@ strongSwan software suite.
The syntax is as follows: The syntax is as follows:
settings := (section|keyvalue)* settings := (section|keyvalue)*
section := name { settings } section := name { settings }
keyvalue := key = value\n keyvalue := key = value\n
Settings contain zero or more sub-sections or key/value pairs. A section Settings contain zero or more sub-sections or key/value pairs. A section
consists of a name, followed by curly open and close brackets. The value in the consists of a name, followed by curly open and close brackets. The value in the
@@ -150,24 +150,24 @@ The actions section in the test specific configuration file defines
the IKEv2 protocol actions to trigger. Currently, the following actions the IKEv2 protocol actions to trigger. Currently, the following actions
are supported and take these arguments (as key/value pairs): are supported and take these arguments (as key/value pairs):
initiate: Initiate an IKE- and CHILD_SA initiate: Initiate an IKE- and CHILD_SA
config: name of the CHILD_SA configuration to initiate config: name of the CHILD_SA configuration to initiate
delay: Delay to trigger action after startup delay: Delay to trigger action after startup
rekey_ike: Rekey an IKE_SA rekey_ike: Rekey an IKE_SA
config: name of originating IKE_SA configuration config: name of originating IKE_SA configuration
delay: Delay to trigger action after startup delay: Delay to trigger action after startup
rekey_child: Rekey an CHILD_SA rekey_child: Rekey an CHILD_SA
config: name of originating CHILD_SA configuration config: name of originating CHILD_SA configuration
delay: Delay to trigger action after startup delay: Delay to trigger action after startup
liveness: Do a liveness check (DPD) on the IKE_SA liveness: Do a liveness check (DPD) on the IKE_SA
config: name of originating IKE_SA configuration config: name of originating IKE_SA configuration
delay: Delay to trigger action after startup delay: Delay to trigger action after startup
close_ike: Close an IKE_SA close_ike: Close an IKE_SA
config: name of originating IKE_SA configuration config: name of originating IKE_SA configuration
delay: Delay to trigger action after startup delay: Delay to trigger action after startup
close_child: Close a CHILD_SA close_child: Close a CHILD_SA
config: name of originating IKE_SA configuration config: name of originating IKE_SA configuration
delay: Delay to trigger action after startup delay: Delay to trigger action after startup
To trigger the same action multiple times, the action sections must be named To trigger the same action multiple times, the action sections must be named
uniquely. Append an arbitrary string to the action name. The following example uniquely. Append an arbitrary string to the action name. The following example
+6 -6
View File
@@ -100,8 +100,8 @@ down)
shift shift
if [ "$#" -ne 1 ] if [ "$#" -ne 1 ]
then then
echo "Usage: $IPSEC_SCRIPT down <connection name>" echo "Usage: $IPSEC_SCRIPT down <connection name>"
exit 2 exit 2
fi fi
rc=7 rc=7
if [ -e $IPSEC_CHARON_PID ] if [ -e $IPSEC_CHARON_PID ]
@@ -115,8 +115,8 @@ down-srcip)
shift shift
if [ "$#" -lt 1 ] if [ "$#" -lt 1 ]
then then
echo "Usage: $IPSEC_SCRIPT down-srcip <start> [<end>]" echo "Usage: $IPSEC_SCRIPT down-srcip <start> [<end>]"
exit 2 exit 2
fi fi
rc=7 rc=7
if [ -e $IPSEC_CHARON_PID ] if [ -e $IPSEC_CHARON_PID ]
@@ -283,8 +283,8 @@ up)
shift shift
if [ "$#" -ne 1 ] if [ "$#" -ne 1 ]
then then
echo "Usage: $IPSEC_SCRIPT up <connection name>" echo "Usage: $IPSEC_SCRIPT up <connection name>"
exit 2 exit 2
fi fi
rc=7 rc=7
if [ -e $IPSEC_CHARON_PID ] if [ -e $IPSEC_CHARON_PID ]
+1 -1
View File
@@ -140,7 +140,7 @@ processing/jobs/dpd_timeout_job.c processing/jobs/dpd_timeout_job.h \
processing/jobs/adopt_children_job.c processing/jobs/adopt_children_job.h processing/jobs/adopt_children_job.c processing/jobs/adopt_children_job.h
libcharon_la_SOURCES += \ libcharon_la_SOURCES += \
bus/listeners/sys_logger.c bus/listeners/sys_logger.h bus/listeners/sys_logger.c bus/listeners/sys_logger.h
LOCAL_SRC_FILES := $(filter %.c,$(libcharon_la_SOURCES)) LOCAL_SRC_FILES := $(filter %.c,$(libcharon_la_SOURCES))
@@ -229,7 +229,7 @@ Vici::Message - Perl extension for building and parsing strongSwan VICI messages
=head1 SYNOPSIS =head1 SYNOPSIS
use Vici::Message; use Vici::Message;
=head1 DESCRIPTION =head1 DESCRIPTION
@@ -21,7 +21,7 @@ sub new {
my $class = shift; my $class = shift;
my $socket = shift; my $socket = shift;
my $self = { my $self = {
Transport => Vici::Transport->new($socket), Transport => Vici::Transport->new($socket),
}; };
bless($self, $class); bless($self, $class);
return $self; return $self;
@@ -98,7 +98,7 @@ sub streamed_request {
my ($self, $command, $event, $vars) = @_; my ($self, $command, $event, $vars) = @_;
my $out = defined $vars ? $vars->encode() : ''; my $out = defined $vars ? $vars->encode() : '';
$self->register($event); $self->register($event);
my $request = pack('CC/a*a*', CMD_REQUEST, $command, $out); my $request = pack('CC/a*a*', CMD_REQUEST, $command, $out);
$self->{'Transport'}->send($request); $self->{'Transport'}->send($request);
@@ -112,13 +112,13 @@ sub streamed_request {
if ( $type == EVENT ) if ( $type == EVENT )
{ {
(my $event_name, $data) = unpack('C/a*a*', $data); (my $event_name, $data) = unpack('C/a*a*', $data);
if ($event_name eq $event) if ($event_name eq $event)
{ {
my $msg = Vici::Message->from_data($data); my $msg = Vici::Message->from_data($data);
push(@list, $msg); push(@list, $msg);
} }
} }
elsif ( $type == CMD_RESPONSE ) elsif ( $type == CMD_RESPONSE )
{ {
@@ -142,7 +142,7 @@ Vici::Packet - Perl extension for sending and receiving strongSwan VICI packets
=head1 SYNOPSIS =head1 SYNOPSIS
use Vici::Packet; use Vici::Packet;
=head1 DESCRIPTION =head1 DESCRIPTION
@@ -25,7 +25,7 @@ sub stats {
} }
sub reload_settings { sub reload_settings {
return request_res('reload-settings', @_); return request_res('reload-settings', @_);
} }
sub initiate { sub initiate {
@@ -125,7 +125,7 @@ sub flush_certs {
} }
sub clear_creds { sub clear_creds {
return request_res('clear-creds', @_); return request_res('clear-creds', @_);
} }
sub load_authority { sub load_authority {
@@ -197,7 +197,7 @@ Vici::Session - Perl binding for the strongSwan VICI configuration interface
=head1 SYNOPSIS =head1 SYNOPSIS
use Vici::Session; use Vici::Session;
=head1 DESCRIPTION =head1 DESCRIPTION
@@ -53,7 +53,7 @@ Vici::Transport - Perl extension for communicating via a strongSwan VICI socket
=head1 SYNOPSIS =head1 SYNOPSIS
use Vici::Transport; use Vici::Transport;
=head1 DESCRIPTION =head1 DESCRIPTION
@@ -4,10 +4,10 @@ Gem::Specification.new do |s|
s.authors = ["strongSwan Project"] s.authors = ["strongSwan Project"]
s.email = ["[email protected]"] s.email = ["[email protected]"]
s.description = %q{ s.description = %q{
The strongSwan VICI protocol allows external application to monitor, The strongSwan VICI protocol allows external application to monitor,
configure and control the IKE daemon charon. This Ruby Gem provides a configure and control the IKE daemon charon. This Ruby Gem provides a
native client side implementation of the VICI protocol, well suited to native client side implementation of the VICI protocol, well suited to
script automated tasks in a relaible way. script automated tasks in a relaible way.
} }
s.summary = "Native Ruby interface for strongSwan VICI" s.summary = "Native Ruby interface for strongSwan VICI"
s.homepage = "https://wiki.strongswan.org/projects/strongswan/wiki/Vici" s.homepage = "https://wiki.strongswan.org/projects/strongswan/wiki/Vici"
+5 -5
View File
@@ -2,15 +2,15 @@
<?cs each:peercfg = peercfgs ?> <?cs each:peercfg = peercfgs ?>
<div class="expand" id="peercfg-<?cs name:peercfg ?>"> <div class="expand" id="peercfg-<?cs name:peercfg ?>">
<h1><?cs name:peercfg ?>: <h1><?cs name:peercfg ?>:
<span><?cs var:peercfg.local ?></span> &lt;-&gt; <span><?cs var:peercfg.local ?></span> &lt;-&gt;
<span><?cs var:peercfg.remote ?></span> <span><?cs var:peercfg.remote ?></span>
</h1> </h1>
<div class="controls"> <div class="controls">
<?cs if:peercfg.remote != "%any" ?> <?cs if:peercfg.remote != "%any" ?>
<a title="initiate SA" href="<?cs var:base ?>/control/initiateike/<?cs name:peercfg ?>"> <a title="initiate SA" href="<?cs var:base ?>/control/initiateike/<?cs name:peercfg ?>">
<img src="<?cs var:base ?>/static/initiate.png"/> <img src="<?cs var:base ?>/static/initiate.png"/>
</a> </a>
<?cs else ?> <?cs else ?>
&nbsp; &nbsp;
<?cs /if ?> <?cs /if ?>
</div> </div>
@@ -79,9 +79,9 @@
<tr class="images"> <tr class="images">
<td colspan="2"> <td colspan="2">
<?cs each:net = childcfg.local.networks ?> <?cs each:net = childcfg.local.networks ?>
<p><?cs var:net ?></p> <p><?cs var:net ?></p>
<?cs /each ?> <?cs /each ?>
</td> </td>
<td style="background-image:url(<?cs var:base ?>/static/pipe-thin-left.png)"> <td style="background-image:url(<?cs var:base ?>/static/pipe-thin-left.png)">
<br/><br/><br/> <br/><br/><br/>
</td> </td>
+23 -23
View File
@@ -2,9 +2,9 @@
<?cs each:ikesa = ikesas ?> <?cs each:ikesa = ikesas ?>
<div class="expand" id="ikesa-<?cs name:ikesa ?>"> <div class="expand" id="ikesa-<?cs name:ikesa ?>">
<h1> <h1>
<?cs var:ikesa.peerconfig ?> [IKE #<?cs name:ikesa ?>]: <?cs var:ikesa.peerconfig ?> [IKE #<?cs name:ikesa ?>]:
<span><?cs var:ikesa.local.identification ?></span> &lt;-&gt; <span><?cs var:ikesa.local.identification ?></span> &lt;-&gt;
<span><?cs var:ikesa.remote.identification ?></span> <span><?cs var:ikesa.remote.identification ?></span>
</h1> </h1>
<div class="controls"> <div class="controls">
<a title="close IKE_SA" href="<?cs var:base ?>/control/terminateike/<?cs name:ikesa ?>"> <a title="close IKE_SA" href="<?cs var:base ?>/control/terminateike/<?cs name:ikesa ?>">
@@ -33,8 +33,8 @@
<?cs /if ?> <?cs /if ?>
</td> </td>
<td style="background-image:url(<?cs var:base ?>/static/pipe.png)"> <td style="background-image:url(<?cs var:base ?>/static/pipe.png)">
<?cs var:ikesa.local.spi ?><br/><br/><br/> <?cs var:ikesa.local.spi ?><br/><br/><br/>
<?cs var:ikesa.local.address ?> <?cs var:ikesa.local.address ?>
</td> </td>
<td> <td>
<?cs if:ikesa.local.nat == "true" ?> <?cs if:ikesa.local.nat == "true" ?>
@@ -58,8 +58,8 @@
<?cs /if ?> <?cs /if ?>
</td> </td>
<td class="right" style="background-image:url(<?cs var:base ?>/static/pipe.png)"> <td class="right" style="background-image:url(<?cs var:base ?>/static/pipe.png)">
<?cs var:ikesa.remote.spi ?><br/><br/><br/> <?cs var:ikesa.remote.spi ?><br/><br/><br/>
<?cs var:ikesa.remote.address ?> <?cs var:ikesa.remote.address ?>
</td> </td>
<td> <td>
<?cs if:ikesa.role == "responder" ?> <?cs if:ikesa.role == "responder" ?>
@@ -71,11 +71,11 @@
</tr> </tr>
<?cs each:childsa = ikesa.childsas ?> <?cs each:childsa = ikesa.childsas ?>
<tr> <tr>
<td colspan="6" class="expand"> <td colspan="6" class="expand">
<h1><?cs var:childsa.childconfig ?> [IPsec #<?cs name:childsa ?>]:</h1> <h1><?cs var:childsa.childconfig ?> [IPsec #<?cs name:childsa ?>]:</h1>
</td> </td>
<td class="controls"> <td class="controls">
<a title="close CHILD_SA" href="<?cs var:base ?>/control/terminatechild/<?cs name:childsa ?>"> <a title="close CHILD_SA" href="<?cs var:base ?>/control/terminatechild/<?cs name:childsa ?>">
<img src="<?cs var:base ?>/static/close.png"/> <img src="<?cs var:base ?>/static/close.png"/>
</a> </a>
</td> </td>
@@ -84,24 +84,24 @@
<td colspan="7"><hr/></td> <td colspan="7"><hr/></td>
</tr> </tr>
<tr class="images"> <tr class="images">
<td colspan="2"> <td colspan="2">
<?cs each:net = childsa.local.networks ?> <?cs each:net = childsa.local.networks ?>
<p><?cs var:net ?></p> <p><?cs var:net ?></p>
<?cs /each ?> <?cs /each ?>
</td> </td>
<td style="background-image:url(<?cs var:base ?>/static/pipe-thin-left-green.png)"> <td style="background-image:url(<?cs var:base ?>/static/pipe-thin-left-green.png)">
<?cs var:childsa.local.spi ?> &lt;-<br/><br/><br/> <?cs var:childsa.local.spi ?> &lt;-<br/><br/><br/>
</td> </td>
<td style="background-image:url(<?cs var:base ?>/static/pipe-thin-green.png)"> <td style="background-image:url(<?cs var:base ?>/static/pipe-thin-green.png)">
</td> </td>
<td class="right" style="background-image:url(<?cs var:base ?>/static/pipe-thin-right-green.png)"> <td class="right" style="background-image:url(<?cs var:base ?>/static/pipe-thin-right-green.png)">
-&gt; <?cs var:childsa.remote.spi ?><br/><br/><br/> -&gt; <?cs var:childsa.remote.spi ?><br/><br/><br/>
</td> </td>
<td class="right" colspan="2"> <td class="right" colspan="2">
<?cs each:net = childsa.remote.networks ?> <?cs each:net = childsa.remote.networks ?>
<p><?cs var:net ?></p> <p><?cs var:net ?></p>
<?cs /each ?> <?cs /each ?>
</td> </td>
</tr> </tr>
<?cs /each ?> <?cs /each ?>
</table> </table>
+1 -1
View File
@@ -56,7 +56,7 @@ do
execute_chroot "chgrp www-data /etc/pts" 0 execute_chroot "chgrp www-data /etc/pts" 0
execute_chroot "chmod g+w /etc/pts" 0 execute_chroot "chmod g+w /etc/pts" 0
fi fi
if [ "$host" = "winnetou" ] if [ "$host" = "winnetou" ]
then then
execute "mkdir $LOOPDIR/var/log/apache2/ocsp" 0 execute "mkdir $LOOPDIR/var/log/apache2/ocsp" 0
execute "cp -rf $DIR/../images $LOOPDIR/var/www/" 0 execute "cp -rf $DIR/../images $LOOPDIR/var/www/" 0
+12 -12
View File
@@ -183,21 +183,21 @@ running_any()
function searchandreplace { function searchandreplace {
SEARCHSTRING="$1" SEARCHSTRING="$1"
REPLACESTRING="$2" REPLACESTRING="$2"
DESTDIR="$3" DESTDIR="$3"
[ -d "$DESTDIR" ] || die "$DESTDIR is not a directory!" [ -d "$DESTDIR" ] || die "$DESTDIR is not a directory!"
########################################### ###########################################
# search and replace in each found file the # search and replace in each found file the
# given string # given string
# #
for eachfoundfile in `find $DESTDIR -type f` for eachfoundfile in `find $DESTDIR -type f`
do do
sed -i -e "s/$SEARCHSTRING/$REPLACESTRING/g" "$eachfoundfile" sed -i -e "s/$SEARCHSTRING/$REPLACESTRING/g" "$eachfoundfile"
done done
} }
+85 -85
View File
@@ -45,37 +45,37 @@ cp -rfp $DEFAULTTESTSDIR/${testname}/* $TESTDIR
for host in $STRONGSWANHOSTS for host in $STRONGSWANHOSTS
do do
eval ipv4_${host}="`echo $HOSTNAMEIPV4 | 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 ipv6_${host}="`echo $HOSTNAMEIPV6 | sed -n -e "s/^.*${host},//gp" | awk -F, '{ print $1 }' | awk '{ print $1 }'`"
case $host in case $host in
moon) moon)
eval ipv4_moon1="`echo $HOSTNAMEIPV4 | sed -n -e "s/^.*${host},//gp" | awk -F, '{ print $2 }' | awk '{ print $1 }'`" eval ipv4_moon1="`echo $HOSTNAMEIPV4 | sed -n -e "s/^.*${host},//gp" | awk -F, '{ print $2 }' | awk '{ print $1 }'`"
eval ipv6_moon1="`echo $HOSTNAMEIPV6 | sed -n -e "s/^.*${host},//gp" | awk -F, '{ print $2 }' | awk '{ print $1 }'`" eval ipv6_moon1="`echo $HOSTNAMEIPV6 | sed -n -e "s/^.*${host},//gp" | awk -F, '{ print $2 }' | awk '{ print $1 }'`"
;; ;;
sun) sun)
eval ipv4_sun1="`echo $HOSTNAMEIPV4 | sed -n -e "s/^.*${host},//gp" | awk -F, '{ print $2 }' | awk '{ print $1 }'`" eval ipv4_sun1="`echo $HOSTNAMEIPV4 | sed -n -e "s/^.*${host},//gp" | awk -F, '{ print $2 }' | awk '{ print $1 }'`"
eval ipv6_sun1="`echo $HOSTNAMEIPV6 | sed -n -e "s/^.*${host},//gp" | awk -F, '{ print $2 }' | awk '{ print $1 }'`" eval ipv6_sun1="`echo $HOSTNAMEIPV6 | sed -n -e "s/^.*${host},//gp" | awk -F, '{ print $2 }' | awk '{ print $1 }'`"
;; ;;
alice) alice)
eval ipv4_alice1="`echo $HOSTNAMEIPV4 | sed -n -e "s/^.*${host},//gp" | awk -F, '{ print $2 }' | awk '{ print $1 }'`" eval ipv4_alice1="`echo $HOSTNAMEIPV4 | sed -n -e "s/^.*${host},//gp" | awk -F, '{ print $2 }' | awk '{ print $1 }'`"
eval ipv6_alice1="`echo $HOSTNAMEIPV6 | sed -n -e "s/^.*${host},//gp" | awk -F, '{ print $2 }' | awk '{ print $1 }'`" eval ipv6_alice1="`echo $HOSTNAMEIPV6 | sed -n -e "s/^.*${host},//gp" | awk -F, '{ print $2 }' | awk '{ print $1 }'`"
;; ;;
venus) venus)
;; ;;
bob) bob)
;; ;;
carol) carol)
eval ipv4_carol1="`echo $HOSTNAMEIPV4 | sed -n -e "s/^.*${host},//gp" | awk -F, '{ print $2 }' | awk '{ print $1 }'`" eval ipv4_carol1="`echo $HOSTNAMEIPV4 | sed -n -e "s/^.*${host},//gp" | awk -F, '{ print $2 }' | awk '{ print $1 }'`"
eval ipv6_carol1="`echo $HOSTNAMEIPV6 | sed -n -e "s/^.*${host},//gp" | awk -F, '{ print $2 }' | awk '{ print $1 }'`" eval ipv6_carol1="`echo $HOSTNAMEIPV6 | sed -n -e "s/^.*${host},//gp" | awk -F, '{ print $2 }' | awk '{ print $1 }'`"
;; ;;
dave) dave)
eval ipv4_dave1="`echo $HOSTNAMEIPV4 | sed -n -e "s/^.*${host},//gp" | awk -F, '{ print $2 }' | awk '{ print $1 }'`" eval ipv4_dave1="`echo $HOSTNAMEIPV4 | sed -n -e "s/^.*${host},//gp" | awk -F, '{ print $2 }' | awk '{ print $1 }'`"
eval ipv6_dave1="`echo $HOSTNAMEIPV6 | sed -n -e "s/^.*${host},//gp" | awk -F, '{ print $2 }' | awk '{ print $1 }'`" eval ipv6_dave1="`echo $HOSTNAMEIPV6 | sed -n -e "s/^.*${host},//gp" | awk -F, '{ print $2 }' | awk '{ print $1 }'`"
;; ;;
winnetou) winnetou)
;; ;;
esac esac
done done
############################################################################## ##############################################################################
@@ -84,50 +84,50 @@ done
for host in $STRONGSWANHOSTS for host in $STRONGSWANHOSTS
do do
case $host in case $host in
moon) moon)
searchandreplace PH_IP_MOON1 $ipv4_moon1 $TESTDIR searchandreplace PH_IP_MOON1 $ipv4_moon1 $TESTDIR
searchandreplace PH_IP_MOON $ipv4_moon $TESTDIR searchandreplace PH_IP_MOON $ipv4_moon $TESTDIR
searchandreplace PH_IP6_MOON1 $ipv6_moon1 $TESTDIR searchandreplace PH_IP6_MOON1 $ipv6_moon1 $TESTDIR
searchandreplace PH_IP6_MOON $ipv6_moon $TESTDIR searchandreplace PH_IP6_MOON $ipv6_moon $TESTDIR
;; ;;
sun) sun)
searchandreplace PH_IP_SUN1 $ipv4_sun1 $TESTDIR searchandreplace PH_IP_SUN1 $ipv4_sun1 $TESTDIR
searchandreplace PH_IP_SUN $ipv4_sun $TESTDIR searchandreplace PH_IP_SUN $ipv4_sun $TESTDIR
searchandreplace PH_IP6_SUN1 $ipv6_sun1 $TESTDIR searchandreplace PH_IP6_SUN1 $ipv6_sun1 $TESTDIR
searchandreplace PH_IP6_SUN $ipv6_sun $TESTDIR searchandreplace PH_IP6_SUN $ipv6_sun $TESTDIR
;; ;;
alice) alice)
searchandreplace PH_IP_ALICE1 $ipv4_alice1 $TESTDIR searchandreplace PH_IP_ALICE1 $ipv4_alice1 $TESTDIR
searchandreplace PH_IP_ALICE $ipv4_alice $TESTDIR searchandreplace PH_IP_ALICE $ipv4_alice $TESTDIR
searchandreplace PH_IP6_ALICE1 $ipv6_alice1 $TESTDIR searchandreplace PH_IP6_ALICE1 $ipv6_alice1 $TESTDIR
searchandreplace PH_IP6_ALICE $ipv6_alice $TESTDIR searchandreplace PH_IP6_ALICE $ipv6_alice $TESTDIR
;; ;;
venus) venus)
searchandreplace PH_IP_VENUS $ipv4_venus $TESTDIR searchandreplace PH_IP_VENUS $ipv4_venus $TESTDIR
searchandreplace PH_IP6_VENUS $ipv6_venus $TESTDIR searchandreplace PH_IP6_VENUS $ipv6_venus $TESTDIR
;; ;;
bob) bob)
searchandreplace PH_IP_BOB $ipv4_bob $TESTDIR searchandreplace PH_IP_BOB $ipv4_bob $TESTDIR
searchandreplace PH_IPV6_BOB $ipv6_bob $TESTDIR searchandreplace PH_IPV6_BOB $ipv6_bob $TESTDIR
;; ;;
carol) carol)
searchandreplace PH_IP_CAROL1 $ipv4_carol1 $TESTDIR searchandreplace PH_IP_CAROL1 $ipv4_carol1 $TESTDIR
searchandreplace PH_IP_CAROL $ipv4_carol $TESTDIR searchandreplace PH_IP_CAROL $ipv4_carol $TESTDIR
searchandreplace PH_IP6_CAROL1 $ipv6_carol1 $TESTDIR searchandreplace PH_IP6_CAROL1 $ipv6_carol1 $TESTDIR
searchandreplace PH_IP6_CAROL $ipv6_carol $TESTDIR searchandreplace PH_IP6_CAROL $ipv6_carol $TESTDIR
;; ;;
dave) dave)
searchandreplace PH_IP_DAVE1 $ipv4_dave1 $TESTDIR searchandreplace PH_IP_DAVE1 $ipv4_dave1 $TESTDIR
searchandreplace PH_IP_DAVE $ipv4_dave $TESTDIR searchandreplace PH_IP_DAVE $ipv4_dave $TESTDIR
searchandreplace PH_IP6_DAVE1 $ipv6_dave1 $TESTDIR searchandreplace PH_IP6_DAVE1 $ipv6_dave1 $TESTDIR
searchandreplace PH_IP6_DAVE $ipv6_dave $TESTDIR searchandreplace PH_IP6_DAVE $ipv6_dave $TESTDIR
;; ;;
winnetou) winnetou)
searchandreplace PH_IP_WINNETOU $ipv4_winnetou $TESTDIR searchandreplace PH_IP_WINNETOU $ipv4_winnetou $TESTDIR
searchandreplace PH_IP6_WINNETOU $ipv6_winnetou $TESTDIR searchandreplace PH_IP6_WINNETOU $ipv6_winnetou $TESTDIR
;; ;;
esac esac
done done
source $TESTDIR/test.conf source $TESTDIR/test.conf
@@ -138,11 +138,11 @@ source $TESTDIR/test.conf
if [ -d $TESTDIR/hosts ] if [ -d $TESTDIR/hosts ]
then then
for host in `ls $TESTDIR/hosts` for host in `ls $TESTDIR/hosts`
do do
eval HOSTLOGIN=root@\$ipv4_${host} eval HOSTLOGIN=root@\$ipv4_${host}
scp $SSHCONF -r $TESTDIR/hosts/$host/etc $HOSTLOGIN:/ > /dev/null 2>&1 scp $SSHCONF -r $TESTDIR/hosts/$host/etc $HOSTLOGIN:/ > /dev/null 2>&1
done done
fi fi
@@ -152,9 +152,9 @@ fi
for host in $IPSECHOSTS for host in $IPSECHOSTS
do do
eval HOSTLOGIN=root@\$ipv4_${host} eval HOSTLOGIN=root@\$ipv4_${host}
ssh $SSHCONF $HOSTLOGIN 'rm -f /var/log/auth.log /var/log/daemon.log; \ ssh $SSHCONF $HOSTLOGIN 'rm -f /var/log/auth.log /var/log/daemon.log; \
kill -SIGHUP `cat /var/run/rsyslogd.pid`' > /dev/null 2>&1 kill -SIGHUP `cat /var/run/rsyslogd.pid`' > /dev/null 2>&1
done done
@@ -164,7 +164,7 @@ done
for host in $RADIUSHOSTS for host in $RADIUSHOSTS
do do
eval HOSTLOGIN=root@\$ipv4_${host} eval HOSTLOGIN=root@\$ipv4_${host}
ssh $SSHCONF $HOSTLOGIN 'rm -f /var/log/daemon.log /var/log/freeradius/radius.log; \ ssh $SSHCONF $HOSTLOGIN 'rm -f /var/log/daemon.log /var/log/freeradius/radius.log; \
kill -SIGHUP `cat /var/run/rsyslogd.pid`' > /dev/null 2>&1 kill -SIGHUP `cat /var/run/rsyslogd.pid`' > /dev/null 2>&1
done done
+6 -6
View File
@@ -32,10 +32,10 @@ TESTSDIR=$BUILDDIR/tests
if [ -d $TESTSDIR/${testname}/hosts ] if [ -d $TESTSDIR/${testname}/hosts ]
then then
for host in `ls $TESTSDIR/${testname}/hosts` for host in `ls $TESTSDIR/${testname}/hosts`
do do
eval HOSTLOGIN="root@`echo $HOSTNAMEIPV4 | 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 $SSHCONF -r $HOSTCONFIGDIR/${host}/etc $HOSTLOGIN:/ > /dev/null 2>&1 scp $SSHCONF -r $HOSTCONFIGDIR/${host}/etc $HOSTLOGIN:/ > /dev/null 2>&1
scp $SSHCONF -r $HOSTCONFIGDIR/default/etc $HOSTLOGIN:/ > /dev/null 2>&1 scp $SSHCONF -r $HOSTCONFIGDIR/default/etc $HOSTLOGIN:/ > /dev/null 2>&1
done done
fi fi