summaryrefslogtreecommitdiff
path: root/testing/tests/swanctl/ip-pool-db/pretest.dat
diff options
context:
space:
mode:
Diffstat (limited to 'testing/tests/swanctl/ip-pool-db/pretest.dat')
-rwxr-xr-xtesting/tests/swanctl/ip-pool-db/pretest.dat21
1 files changed, 21 insertions, 0 deletions
diff --git a/testing/tests/swanctl/ip-pool-db/pretest.dat b/testing/tests/swanctl/ip-pool-db/pretest.dat
new file mode 100755
index 000000000..0607f6715
--- /dev/null
+++ b/testing/tests/swanctl/ip-pool-db/pretest.dat
@@ -0,0 +1,21 @@
+moon::cat /usr/local/share/strongswan/templates/database/sql/sqlite.sql > /etc/ipsec.d/ipsec.sql
+moon::cat /etc/ipsec.d/ipsec.sql | sqlite3 /etc/ipsec.d/ipsec.db
+moon::ipsec pool --add big_pool --start 10.3.0.1 --end 10.3.3.232 --timeout 0 2> /dev/null
+moon::ipsec pool --addattr dns --server PH_IP_WINNETOU 2> /dev/null
+moon::ipsec pool --addattr dns --server PH_IP_VENUS 2> /dev/null
+moon::ipsec pool --addattr nbns --server PH_IP_VENUS 2> /dev/null
+moon::iptables-restore < /etc/iptables.rules
+carol::iptables-restore < /etc/iptables.rules
+dave::iptables-restore < /etc/iptables.rules
+moon::service charon start 2> /dev/null
+carol::service charon start 2> /dev/null
+dave::service charon start 2> /dev/null
+moon::sleep 1
+moon::swanctl --load-conns 2> /dev/null
+carol::swanctl --load-conns 2> /dev/null
+dave::swanctl --load-conns 2> /dev/null
+moon::swanctl --load-creds 2> /dev/null
+carol::swanctl --load-creds 2> /dev/null
+dave::swanctl --load-creds 2> /dev/null
+carol::swanctl --initiate --child home 2> /dev/null
+dave::swanctl --initiate --child home 2> /dev/null