| | 101 | ############################### |
|---|
| | 102 | # In order to have the test systems work we need to update the /etc/hosts file so |
|---|
| | 103 | # that the domain names listed in the CPA's can be resolved. |
|---|
| | 104 | # Updating the /etc/hosts file. |
|---|
| | 105 | ############################### |
|---|
| | 106 | |
|---|
| | 107 | HOST_1=coronation-ebXML-b2b-gateway |
|---|
| | 108 | HOST_2=gnaraloo-ebXML-b2b-gateway |
|---|
| | 109 | |
|---|
| | 110 | grep "127.0.0.1.*$HOST_1" /etc/hosts >/dev/null |
|---|
| | 111 | if [ $? -eq 0 ]; then |
|---|
| | 112 | echo "$HOST_1 already listed in the /etc/hosts file present. Nothing to do." |
|---|
| | 113 | else |
|---|
| | 114 | echo "$HOST_1 not in the /etc/hosts file. Adding it." |
|---|
| | 115 | echo "127.0.0.1 $HOST_1" >> /etc/hosts |
|---|
| | 116 | fi |
|---|
| | 117 | |
|---|
| | 118 | grep "127.0.0.1.*$HOST_2" /etc/hosts >/dev/null |
|---|
| | 119 | if [ $? -eq 0 ]; then |
|---|
| | 120 | echo "$HOST_2 already listed in the /etc/hosts file present. Nothing to do." |
|---|
| | 121 | else |
|---|
| | 122 | echo "$HOST_2 not in the /etc/hosts file. Adding it." |
|---|
| | 123 | echo "127.0.0.1 $HOST_2" >> /etc/hosts |
|---|
| | 124 | fi |
|---|
| | 125 | |
|---|
| | 126 | |
|---|