Package: xen-tools
Version: 4.4-1
Severity: wishlist
Tags: patch
This is fixed in git in commit 079382302ba0fd6bb22d5ca8d502eaa4c0ac1730
but I don't see it in the BTS. Is everybody using the git version?
Anyway, the current code uses the variable "gateway" for two different
things, namely, the ip of the gateway and the complete line to be
written in /etc/network/interfaces.
In general, I consider bad coding style that the same variable is used
for two different things (even if they are related). So, I would
propose something like this instead, which, by looking at the "bcast"
variable, maybe it's a little bit closer to what the programmer had in
mind when this bug was introduced.
diff --git a/xen-tools-4.4/hooks/common/40-setup-networking-deb
b/xen-tools-4.4/hooks/common/40-setup-networking-deb
index 162d0b2..c25d049 100755
--- a/xen-tools-4.4/hooks/common/40-setup-networking-deb
+++ b/xen-tools-4.4/hooks/common/40-setup-networking-deb
@@ -88,9 +88,9 @@ setupStaticNetworking ()
#
# gateway address?
#
- gateway='';
+ gway='';
if [ -n "${gateway}" ]; then
- gateway=" gateway ${gateway}"
+ gway=" gateway ${gateway}"
fi
#
@@ -108,7 +108,7 @@ iface lo inet loopback
auto eth0
iface eth0 inet static
address ${ip1}
-${gateway}
+${gway}
netmask ${netmask}
${bcast}
${point}
Thanks.
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]