Skip to content

Commit 1582e1c

Browse files
committed
remove add-host script
1 parent 8202adb commit 1582e1c

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,9 +121,8 @@ Quick example, with the default config.
121121

122122
#Add the pair "ip hostname" to /etc/hosts on each containers,
123123
#beacause ldap.example.org and ldap2.example.org are fake hostnames
124-
docker exec $LDAP_CID /sbin/add-host $LDAP2_IP ldap2.example.org
125-
docker exec $LDAP2_CID /sbin/add-host $LDAP_IP ldap.example.org
126-
124+
docker exec $LDAP_CID bash -c "echo $LDAP2_IP ldap2.example.org >> /etc/hosts"
125+
docker exec $LDAP2_CID bash -c "echo $LDAP_IP ldap.example.org >> /etc/hosts"
127126

128127
That's it ! But a litle test to be sure :
129128

test/test.bats

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@ load test_helper
7171
run_image -h ldap.example.org -e LDAP_REPLICATION=true -e IS_REPLICATION_TEST=true
7272

7373
# add route to hosts
74-
docker exec $LDAP_REPL_CID /sbin/add-host $CONTAINER_IP ldap.example.org
75-
docker exec $CONTAINER_ID /sbin/add-host $LDAP_REPL_IP ldap2.example.org
74+
docker exec $LDAP_CID bash -c "echo $LDAP2_IP ldap2.example.org >> /etc/hosts"
75+
docker exec $LDAP2_CID bash -c "echo $LDAP_IP ldap.example.org >> /etc/hosts"
7676

7777
# wait services on both servers
7878
wait_service slapd

0 commit comments

Comments
 (0)