diff --git a/debian/changelog b/debian/changelog index 3baa874..2aaadef 100644 --- a/debian/changelog +++ b/debian/changelog @@ -16,6 +16,8 @@ xen-tools (4.4~dev-1) UNRELEASED; urgency=low xen-create-image, neither xt-create-xen-config nor xm support it. * Refactoring: Replace all occurrences of "! -z" by "-n" in hooks and bash completion. + * Handle potentially empty gateway setting properly in + hooks/common/40-setup-networking-deb. Thanks Simone Caruso! -- Axel Beckert Fri, 23 Aug 2013 21:13:07 +0200 diff --git a/hooks/common/40-setup-networking-deb b/hooks/common/40-setup-networking-deb index 4cbc83c..3d9caca 100755 --- a/hooks/common/40-setup-networking-deb +++ b/hooks/common/40-setup-networking-deb @@ -85,6 +85,14 @@ setupStaticNetworking () bcast=" broadcast ${broadcast}" fi + # + # gateway address? + # + gateway=''; + if [ -n "${gateway}" ]; then + gateway=" gateway ${gateway}" + fi + # # We have a static IP address # @@ -100,7 +108,7 @@ iface lo inet loopback auto eth0 iface eth0 inet static address ${ip1} - gateway ${gateway} +${gateway} netmask ${netmask} ${bcast} ${point}