[debian-lan-devel] [SCM] Debian-LAN development and packaging branch, squeeze, updated. 0.6-8-gd7b4b93
Andreas B. Mundt
andi at debian.org
Sun Jul 22 11:32:28 UTC 2012
The following commit has been merged in the squeeze branch:
commit d7b4b93afd81ec7b414c1438b88b4559688a9b9f
Author: Andreas B. Mundt <andi at debian.org>
Date: Sat Jul 21 14:41:08 2012 +0200
Fix network interface configuration.
Do not define the gateway when the mainserver is the gateway.
diff --git a/fai/config/scripts/SERVER_A/10-misc b/fai/config/scripts/SERVER_A/10-misc
index f1925ff..4414c1d 100755
--- a/fai/config/scripts/SERVER_A/10-misc
+++ b/fai/config/scripts/SERVER_A/10-misc
@@ -39,10 +39,13 @@ iface eth0 inet static
address ${MAINSERVER_IPADDR}
netmask ${NETMASK}
broadcast ${BROADCAST}
- gateway ${GATEWAY}
EOF
-if [ "$MAINSERVER_IPADDR" == "$GATEWAY" ] ; then
+if [ "$MAINSERVER_IPADDR" != "$GATEWAY" ] ; then
+ cat >> $target/etc/network/interfaces <<EOF
+ gateway ${GATEWAY}
+EOF
+else
cat >> $target/etc/network/interfaces <<EOF
post-up iptables -t nat -A POSTROUTING -o eth1 -j MASQUERADE
EOF
--
Debian-LAN development and packaging
More information about the debian-lan-devel
mailing list