Package: vzctl
Version: 3.0.22-1

When I run a virtual server (VE) on a host (HN) with Debian Etch
and own bacported vzctl 3.0.22-1 package, then I get the following
message:

# vzctl start devel1
Starting VE ...
VE is mounted
Adding IP address(es): 193.0.92.171 192.168.1.11
/usr/lib/vzctl/scripts/vps-functions: line 146: [: add: integer expression 
expected

The reason is a small string comparison bug in vps-functions script.
Below is my patch which fixes it:

--- vps-functions.orig	2008-01-08 10:08:57.000000000 +0100
+++ vps-functions	2008-01-08 10:10:51.000000000 +0100
@@ -143,7 +143,7 @@
 	local dev
 
 	for dev in $(vz_get_neighbour_devs "$2"); do
-	        if [ $(cat /proc/sys/net/ipv4/conf/$dev/proxy_arp) == 0 ] && [ "$1" -eq "add" ] ; then
+	        if [ $(cat /proc/sys/net/ipv4/conf/$dev/proxy_arp) == 0 ] && [ "$1" == "add" ] ; then
 		    vzwarning "Function proxy_arp for $dev is set to 0. Enable with 'sysctl -w net.ipv4.conf.$dev.proxy_arp=1'. See /usr/share/doc/vzctl/README.Debian."
 		fi
 

Reply via email to