diff -u vzctl-3.0.22/etc/init.d/vz-redhat.in vzctl-3.0.22/etc/init.d/vz-redhat.in --- vzctl-3.0.22/etc/init.d/vz-redhat.in +++ vzctl-3.0.22/etc/init.d/vz-redhat.in @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # Copyright (C) 2000-2007 SWsoft. All rights reserved. # # This program is free software; you can redistribute it and/or modify diff -u vzctl-3.0.22/etc/vz.conf vzctl-3.0.22/etc/vz.conf --- vzctl-3.0.22/etc/vz.conf +++ vzctl-3.0.22/etc/vz.conf @@ -28,7 +28,7 @@ VE_ROOT=/var/lib/vz/root/$VEID VE_PRIVATE=/var/lib/vz/private/$VEID CONFIGFILE="vps.basic" -DEF_OSTEMPLATE="fedora-core-4" +DEF_OSTEMPLATE="ubuntu" ## Load vzwdog module VZWDOG="no" diff -u vzctl-3.0.22/scripts/vps-functions.in vzctl-3.0.22/scripts/vps-functions.in --- vzctl-3.0.22/scripts/vps-functions.in +++ vzctl-3.0.22/scripts/vps-functions.in @@ -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 diff -u vzctl-3.0.22/debian/control vzctl-3.0.22/debian/control --- vzctl-3.0.22/debian/control +++ vzctl-3.0.22/debian/control @@ -1,7 +1,8 @@ Source: vzctl Section: admin Priority: optional -Maintainer: Ola Lundqvist +Maintainer: Ubuntu MOTU Developers +XSBC-Original-Maintainer: Ola Lundqvist Build-Depends: debhelper (>= 4.0.0) Standards-Version: 3.7.2 diff -u vzctl-3.0.22/debian/README.Debian vzctl-3.0.22/debian/README.Debian --- vzctl-3.0.22/debian/README.Debian +++ vzctl-3.0.22/debian/README.Debian @@ -114,10 +114,10 @@ ---------------------- If you want network access for the virtual server then you need to -enable IP forwarding. You do that in the /etc/network/options file +enable IP forwarding. You do that in the /etc/sysctl.conf file using the directive. - ip_forward=yes + net.ipv4.conf.default.forwarding=1 diff -u vzctl-3.0.22/debian/vzctl.postinst vzctl-3.0.22/debian/vzctl.postinst --- vzctl-3.0.22/debian/vzctl.postinst +++ vzctl-3.0.22/debian/vzctl.postinst @@ -25,19 +25,32 @@ # No idea to start here as no virtual host can have been configured # yet. It may also break here. - # Upgrade path for new vz cron file. To make nice upgrade from - # etch version. - export LANG=C - if [ ! -e /etc/cron.d/vz ] && [ -e /etc/vz/cron/vz ] ; then - if [ -x /usr/sbin/invoke-rc.d ] ; then - if invoke-rc.d vz status | grep "is running" > /dev/null ; then - cp /etc/vz/cron/vz /etc/cron.d/vz - fi - else - if /etc/init.d/vz status | grep "is running" > /dev/null ; then - cp /etc/vz/cron/vz /etc/cron.d/vz + # Check if this is an upgrade + if [ -n "$2" ] ; then + # Upgrade path for new vz cron file. To make nice upgrade from + # etch version. + export LANG=C + if [ ! -e /etc/cron.d/vz ] && [ -e /etc/vz/cron/vz ] ; then + if [ -x /usr/sbin/invoke-rc.d ] ; then + if invoke-rc.d vz status | grep "is running" > /dev/null ; then + cp /etc/vz/cron/vz /etc/cron.d/vz + fi + else + if /etc/init.d/vz status | grep "is running" > /dev/null ; then + cp /etc/vz/cron/vz /etc/cron.d/vz + fi fi fi + # Upgrade path for --name settings + for NAMECFG in $(find /etc/vz/names -maxdepth 1 -name "*.conf"); do + VEID= + SYML=`echo $NAMECFG|sed -e "s/.conf//"` + . $NAMECFG + if [ -n "$VEID" ] && [ ! -L "$SYML" ] && [ ! -e "$SYML" ] ; then + ln -s /etc/vz/conf/$VEID.conf $SYML + rm $NAMECFG + fi + done fi ;; diff -u vzctl-3.0.22/debian/changelog vzctl-3.0.22/debian/changelog --- vzctl-3.0.22/debian/changelog +++ vzctl-3.0.22/debian/changelog @@ -1,3 +1,35 @@ +vzctl (3.0.22-5ubuntu1) hardy; urgency=low + + * Fix bashisms reported in Debian bug 472901, patch from Raphael + Geissert. Patched inline: + - bin/vzmigrate.in + - bin/vznetcfg.in + - bin/vzpid.in + * etc/vz.conf: + Use DEF_OSTEMPLATE="ubuntu" (LP: #218411) + * Modify Maintainer value to match the DebianMaintainerField + specification. + + -- Daniel Hahler Thu, 17 Apr 2008 00:37:08 +0200 + +vzctl (3.0.22-5) unstable; urgency=low + + * Updated README.Debian to use /etc/sysctl.conf instead of depricated + directive in /etc/network/options. + * Corrected two bashism issues, closes: #468468. + Thanks to Raphael Hertzog for both the above + corrections. + + -- Ola Lundqvist Sun, 2 Mar 2008 16:44:27 +0100 + +vzctl (3.0.22-4) unstable; urgency=low + + * Changed shell interpreter from /bin/sh to /bin/bash for vz init + script and vzmigrate, closes: #465377. + * Added upgrade path for --name setting, closes: #460310. + + -- Ola Lundqvist Tue, 12 Feb 2008 18:15:58 +0100 + vzctl (3.0.22-3) unstable; urgency=low * Correction for #459717. Thanks to eyck for the only in patch2: unchanged: --- vzctl-3.0.22.orig/bin/vzpid.in +++ vzctl-3.0.22/bin/vzpid.in @@ -30,7 +30,7 @@ getveid() { - local pid="$1" + local pid; pid="$1" [ -f "/proc/$pid/status" ] || return awk -v "pid=$pid" ' only in patch2: unchanged: --- vzctl-3.0.22.orig/bin/vznetcfg.in +++ vzctl-3.0.22/bin/vznetcfg.in @@ -26,7 +26,7 @@ init_veth() { - local dev="$1" + local dev; dev="$1" ip link set "$dev" up } only in patch2: unchanged: --- vzctl-3.0.22.orig/bin/vzmigrate.in +++ vzctl-3.0.22/bin/vzmigrate.in @@ -124,13 +124,13 @@ log () { if [ $1 -eq 0 ]; then shift - echo -e "Error: " $@ >&2 + printf "Error: " $@"\n" >&2 elif [ $1 -eq 1 ]; then shift - echo -e $@ + printf $@"\n" elif [ $verbose -eq 1 ]; then shift - echo -e " " $@ + printf " " $@"\n" fi }