1 |
#!/bin/bash |
#!/bin/bash |
2 |
|
# $Id$ |
3 |
|
|
4 |
: ${INSTALL_ROOT="/mnt/magellan"} |
: ${INSTALL_ROOT="/mnt/magellan"} |
5 |
|
|
43 |
# the 'a' in the sed line appends a line after the regex (127.0.0.1.*localhost) |
# the 'a' in the sed line appends a line after the regex (127.0.0.1.*localhost) |
44 |
sed -i "/127.0.0.1.*localhost/ a \${NETWORK_IP}\t${NETWORK_HOSTNAME}.${NETWORK_DOMAIN}\t${NETWORK_HOSTNAME}" ${INSTALL_ROOT}/etc/hosts |
sed -i "/127.0.0.1.*localhost/ a \${NETWORK_IP}\t${NETWORK_HOSTNAME}.${NETWORK_DOMAIN}\t${NETWORK_HOSTNAME}" ${INSTALL_ROOT}/etc/hosts |
45 |
else |
else |
46 |
sed -i "s:^\(127.0.0.1.*localhost\):\1\t${NETWORK_HOSTNAME}.${NETWORK_DOMAIN}\t${NETWORK_HOSTNAME}" ${INSTALL_ROOT}/etc/hosts |
sed -i "s:^\(127.0.0.1.*localhost\):\1\t${NETWORK_HOSTNAME}.${NETWORK_DOMAIN}\t${NETWORK_HOSTNAME}:" ${INSTALL_ROOT}/etc/hosts |
47 |
fi |
fi |