wok rev 8056
Add: vzctl
author | Eric Joseph-Alexandre <erjo@slitaz.org> |
---|---|
date | Fri Jan 21 00:56:18 2011 +0100 (2011-01-21) |
parents | 9e1674525e2f |
children | 756516242df3 |
files | vzctl/receipt vzctl/stuff/slitaz-add_ip.sh vzctl/stuff/slitaz-del_ip.sh vzctl/stuff/slitaz-set_hostname.sh vzctl/stuff/slitaz.conf vzctl/stuff/vzctl-3.0.23-Makefile.u vzctl/stuff/vzctl-3.0.23.u vzctl/stuff/vzctl-3.0.25.1-Makefile.u |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/vzctl/receipt Fri Jan 21 00:56:18 2011 +0100 1.3 @@ -0,0 +1,61 @@ 1.4 +# SliTaz package receipt. 1.5 + 1.6 +PACKAGE="vzctl" 1.7 +VERSION="3.0.25.1" 1.8 +CATEGORY="system-tools" 1.9 +SHORT_DESC="OpenVZ containers control utility" 1.10 +MAINTAINER="erjo@slitaz.org" 1.11 +DEPENDS="udev bash procmail bridge-utils logrotate tar gzip" 1.12 +BUILD_DEPENDS="sed" 1.13 +TARBALL="$PACKAGE-$VERSION.tar.bz2" 1.14 +WEB_SITE="http://wiki.openvz.org/Main_Page" 1.15 +WGET_URL="http://download.openvz.org/utils/${PACKAGE}/${VERSION}/src/${TARBALL}" 1.16 + 1.17 +# Rules to configure and make the package. 1.18 +compile_rules() 1.19 +{ 1.20 + cd $src 1.21 + 1.22 + # Apply patches 1.23 + while read patch_file; do 1.24 + if [ -f done.$patch_file ]; then 1.25 + echo "Skipping $patch_file" 1.26 + continue 1.27 + fi 1.28 + echo "Apply $patch_file" 1.29 + patch -p1 < ../stuff/$patch_file || exit 1 1.30 + touch done.$patch_file 1.31 + done <<EOT 1.32 +vzctl-${VERSION}-Makefile.u 1.33 +EOT 1.34 + ./configure \ 1.35 + --prefix=/usr \ 1.36 + --localstatedir=/var \ 1.37 + --enable-bashcomp \ 1.38 + --enable-logrotate && 1.39 + make && make DESTDIR=$PWD/_pkg install && make DESTDIR=$PWD/_pkg install-slitaz 1.40 +} 1.41 + 1.42 +# Rules to gen a SliTaz package suitable for Tazpkg. 1.43 +genpkg_rules() 1.44 +{ 1.45 + mkdir -p $fs/usr/lib \ 1.46 + $fs/usr/share 1.47 + 1.48 + cp -a $_pkg/usr/sbin $fs/usr 1.49 + cp -a $_pkg/usr/lib/vzctl $fs/usr/lib 1.50 + cp -a $_pkg/usr/lib/*.so* $fs/usr/lib 1.51 + cp -a $_pkg/etc $fs/ 1.52 + cp -a $_pkg/var/ $fs/ 1.53 + cp -a $_pkg/vz/ $fs/ 1.54 + 1.55 + # fix permissions 1.56 + chmod 0755 $fs/usr/lib/vzctl/scripts/v* 1.57 + chmod 0755 $fs/usr/sbin/* 1.58 + chmod 0755 $fs/etc/init.d/vz 1.59 + 1.60 + # Copy slitaz script and config 1.61 + cp -a stuff/slitaz.conf $fs/etc/vz/dists 1.62 + cp -a stuff/slitaz-*.sh $fs/etc/vz/dists/scripts 1.63 +} 1.64 +
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 2.2 +++ b/vzctl/stuff/slitaz-add_ip.sh Fri Jan 21 00:56:18 2011 +0100 2.3 @@ -0,0 +1,46 @@ 2.4 +#!/bin/bash 2.5 +# Adds IP address(es) in a container running Slitaz. 2.6 +# 2.7 +# This program is free software; you can redistribute it and/or modify 2.8 +# it under the terms of the GNU General Public License as published by 2.9 +# the Free Software Foundation; either version 2 of the License, or 2.10 +# (at your option) any later version. 2.11 +# 2.12 +# This program is distributed in the hope that it will be useful, 2.13 +# but WITHOUT ANY WARRANTY; without even the implied warranty of 2.14 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 2.15 +# GNU General Public License for more details. 2.16 +# 2.17 +# You should have received a copy of the GNU General Public License 2.18 +# along with this program; if not, write to the Free Software 2.19 +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 2.20 +# 2.21 +# Copyright (C) 2011 Eric Joseph-Alexandre <erjo@slitaz.org> 2.22 +# 2.23 + 2.24 +VENET_DEV=eth0 2.25 +CFGFILE=/etc/network.conf 2.26 + 2.27 +function add_ip() 2.28 +{ 2.29 + if ! grep -q venet0 ${CFGFILE}; then 2.30 + sed -i "s/^INTERFACE.*/INTERFACE=\"${VENET_DEV}\"/" ${CFGFILE} 2.31 + fi 2.32 + 2.33 + if [ ! -z ${IP_ADDR} ]; then 2.34 + sed -i 's/DHCP=.*/DHCP="no"/' ${CFGFILE} 2.35 + sed -i 's/STATIC=.*/STATIC="yes"/' ${CFGFILE} 2.36 + sed -i -e "s/IP=".*"/IP=\"${IP_ADDR}\"/" ${CFGFILE} 2.37 + sed -i -e "s/NETMASK=".*"/NETMASK=\"255.255.255.255\"/" ${CFGFILE} 2.38 + fi 2.39 + 2.40 + # Starting the network 2.41 + /etc/init.d/network.sh 2.42 + 2.43 + # Add default route 2.44 + /sbin/route add default ${VENET_DEV} 2.45 +} 2.46 + 2.47 +add_ip 2.48 + 2.49 +exit 0
3.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 3.2 +++ b/vzctl/stuff/slitaz-del_ip.sh Fri Jan 21 00:56:18 2011 +0100 3.3 @@ -0,0 +1,39 @@ 3.4 +#!/bin/bash 3.5 +# Deletes IP address from a container running SliTaz distro. 3.6 +# 3.7 +# This program is free software; you can redistribute it and/or modify 3.8 +# it under the terms of the GNU General Public License as published by 3.9 +# the Free Software Foundation; either version 2 of the License, or 3.10 +# (at your option) any later version. 3.11 +# 3.12 +# This program is distributed in the hope that it will be useful, 3.13 +# but WITHOUT ANY WARRANTY; without even the implied warranty of 3.14 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 3.15 +# GNU General Public License for more details. 3.16 +# 3.17 +# You should have received a copy of the GNU General Public License 3.18 +# along with this program; if not, write to the Free Software 3.19 +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 3.20 +# 3.21 +# Copyright (C) 2011 Eric Joseph-Alexandre <erjo@slitaz.org> 3.22 + 3.23 + 3.24 +VENET_DEV=eth0 3.25 +CFGFILE=/etc/network.conf 3.26 + 3.27 +# Function to delete IP address 3.28 +function del_ip() 3.29 +{ 3.30 + if grep -q ${IP_ADDR} ${CFGFILE}; then 3.31 + sed -i 's/^IP.*/IP=\"0\"/' ${CFGFILE} 3.32 + fi 3.33 + 3.34 + # Shutting down $VENET_DEV if CT is running. 3.35 + if [ "$VE_STATE" = "running" ]; then 3.36 + /sbin/ifconfig ${VENET_DEV} down 3.37 + fi 3.38 +} 3.39 + 3.40 +del_ip 3.41 + 3.42 +exit 0
4.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 4.2 +++ b/vzctl/stuff/slitaz-set_hostname.sh Fri Jan 21 00:56:18 2011 +0100 4.3 @@ -0,0 +1,39 @@ 4.4 +#!/bin/bash 4.5 +# Copyright (C) 2000-2009, Parallels, Inc. All rights reserved. 4.6 +# Copyright (C) 2011 Eric Joseph-Alexandre <erjo@slitaz.org> 4.7 +# 4.8 +# This program is free software; you can redistribute it and/or modify 4.9 +# it under the terms of the GNU General Public License as published by 4.10 +# the Free Software Foundation; either version 2 of the License, or 4.11 +# (at your option) any later version. 4.12 +# 4.13 +# This program is distributed in the hope that it will be useful, 4.14 +# but WITHOUT ANY WARRANTY; without even the implied warranty of 4.15 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 4.16 +# GNU General Public License for more details. 4.17 +# 4.18 +# You should have received a copy of the GNU General Public License 4.19 +# along with this program; if not, write to the Free Software 4.20 +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 4.21 +# 4.22 +# 4.23 +# Sets up hostname in a container running slitaz-like distro. 4.24 + 4.25 +function set_hostname() 4.26 +{ 4.27 + local cfgfile="$1" 4.28 + local hostname=$2 4.29 + 4.30 + [ -z "${hostname}" ] && return 0 4.31 + 4.32 + hostname=${hostname%%.*} 4.33 + 4.34 + echo "${hostname}" > ${cfgfile} 4.35 + 4.36 + hostname ${hostname} 4.37 +} 4.38 + 4.39 +change_hostname /etc/hosts "${HOSTNM}" "${IP_ADDR}" 4.40 +set_hostname /etc/hostname "${HOSTNM}" 4.41 + 4.42 +exit 0
5.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 5.2 +++ b/vzctl/stuff/slitaz.conf Fri Jan 21 00:56:18 2011 +0100 5.3 @@ -0,0 +1,23 @@ 5.4 +# Copyright (C) 2000-2008, Parallels, Inc. All rights reserved. 5.5 +# 5.6 +# This program is free software; you can redistribute it and/or modify 5.7 +# it under the terms of the GNU General Public License as published by 5.8 +# the Free Software Foundation; either version 2 of the License, or 5.9 +# (at your option) any later version. 5.10 +# 5.11 +# This program is distributed in the hope that it will be useful, 5.12 +# but WITHOUT ANY WARRANTY; without even the implied warranty of 5.13 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 5.14 +# GNU General Public License for more details. 5.15 +# 5.16 +# You should have received a copy of the GNU General Public License 5.17 +# along with this program; if not, write to the Free Software 5.18 +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 5.19 +# 5.20 +ADD_IP=slitaz-add_ip.sh 5.21 +DEL_IP=slitaz-del_ip.sh 5.22 +SET_HOSTNAME=slitaz-set_hostname.sh 5.23 +SET_DNS=set_dns.sh 5.24 +SET_USERPASS=set_userpass.sh 5.25 +SET_UGID_QUOTA=set_ugid_quota.sh 5.26 +POST_CREATE=postcreate.sh
6.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 6.2 +++ b/vzctl/stuff/vzctl-3.0.23-Makefile.u Fri Jan 21 00:56:18 2011 +0100 6.3 @@ -0,0 +1,70 @@ 6.4 +--- vzctl-3.0.23-ori/Makefile.am Thu Oct 30 14:24:43 2008 6.5 ++++ vzctl-3.0.23/Makefile.am Mon Nov 16 16:32:40 2009 6.6 +@@ -49,7 +49,8 @@ 6.7 + install-redhat \ 6.8 + install-gentoo \ 6.9 + install-suse \ 6.10 +- install-debian 6.11 ++ install-debian \ 6.12 ++ install-slitaz 6.13 + 6.14 + $(DISTRO_TARGETS): 6.15 + $(MAKE) $(AM_MAKEFLAGS) -C etc $@ 6.16 +--- vzctl-3.0.23-ori/Makefile.in Thu Oct 30 14:24:52 2008 6.17 ++++ vzctl-3.0.23/Makefile.in Mon Nov 16 16:33:11 2009 6.18 +@@ -217,7 +217,8 @@ 6.19 + install-redhat \ 6.20 + install-gentoo \ 6.21 + install-suse \ 6.22 +- install-debian 6.23 ++ install-debian \ 6.24 ++ install-slitaz 6.25 + 6.26 + all: all-recursive 6.27 + 6.28 +--- vzctl-3.0.23-ori/etc/Makefile.am Thu Oct 30 14:24:43 2008 6.29 ++++ vzctl-3.0.23/etc/Makefile.am Mon Nov 16 16:33:39 2009 6.30 +@@ -43,6 +43,9 @@ 6.31 + 6.32 + install-debian: 6.33 + $(MAKE) $(AM_MAKEFLAGS) -C init.d $@ 6.34 ++ 6.35 ++install-slitaz: 6.36 ++ $(MAKE) $(AM_MAKEFLAGS) -C init.d $@ 6.37 + 6.38 + install-gentoo: 6.39 + $(MAKE) $(AM_MAKEFLAGS) -C init.d $@ 6.40 +--- vzctl-3.0.23-ori/etc/Makefile.in Thu Oct 30 14:24:49 2008 6.41 ++++ vzctl-3.0.23/etc/Makefile.in Mon Nov 16 16:34:00 2009 6.42 +@@ -563,6 +563,9 @@ 6.43 + install-debian: 6.44 + $(MAKE) $(AM_MAKEFLAGS) -C init.d $@ 6.45 + 6.46 ++install-slitaz: 6.47 ++ $(MAKE) $(AM_MAKEFLAGS) -C init.d $@ 6.48 ++ 6.49 + install-gentoo: 6.50 + $(MAKE) $(AM_MAKEFLAGS) -C init.d $@ 6.51 + $(mkinstalldirs) $(DESTDIR)$(sysconfdir)/conf.d 6.52 +--- vzctl-3.0.23-ori/etc/init.d/Makefile.am Thu Oct 30 14:24:43 2008 6.53 ++++ vzctl-3.0.23/etc/init.d/Makefile.am Mon Nov 16 16:34:25 2009 6.54 +@@ -31,6 +31,8 @@ 6.55 + 6.56 + install-debian: install-redhat 6.57 + 6.58 ++install-slitaz: install-redhat 6.59 ++ 6.60 + install-gentoo: vz-gentoo 6.61 + $(mkinstalldirs) $(DESTDIR)$(initddir) 6.62 + $(INSTALL_SCRIPT) vz-gentoo $(DESTDIR)$(initddir)/vz 6.63 +--- vzctl-3.0.23-ori/etc/init.d/Makefile.in Thu Oct 30 14:24:50 2008 6.64 ++++ vzctl-3.0.23/etc/init.d/Makefile.in Mon Nov 16 16:34:40 2009 6.65 +@@ -404,6 +404,8 @@ 6.66 + 6.67 + install-debian: install-redhat 6.68 + 6.69 ++install-slitaz: install-redhat 6.70 ++ 6.71 + install-gentoo: vz-gentoo 6.72 + $(mkinstalldirs) $(DESTDIR)$(initddir) 6.73 + $(INSTALL_SCRIPT) vz-gentoo $(DESTDIR)$(initddir)/vz
7.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 7.2 +++ b/vzctl/stuff/vzctl-3.0.23.u Fri Jan 21 00:56:18 2011 +0100 7.3 @@ -0,0 +1,102 @@ 7.4 +--- vzctl-3.0.23-ori/Makefile.am Thu Oct 30 14:24:43 2008 7.5 ++++ vzctl-3.0.23/Makefile.am Mon Nov 16 21:43:03 2009 7.6 +@@ -49,7 +49,8 @@ 7.7 + install-redhat \ 7.8 + install-gentoo \ 7.9 + install-suse \ 7.10 +- install-debian 7.11 ++ install-debian \ 7.12 ++ install-slitaz 7.13 + 7.14 + $(DISTRO_TARGETS): 7.15 + $(MAKE) $(AM_MAKEFLAGS) -C etc $@ 7.16 +--- vzctl-3.0.23-ori/Makefile.in Thu Oct 30 14:24:52 2008 7.17 ++++ vzctl-3.0.23/Makefile.in Mon Nov 16 21:43:03 2009 7.18 +@@ -217,7 +217,8 @@ 7.19 + install-redhat \ 7.20 + install-gentoo \ 7.21 + install-suse \ 7.22 +- install-debian 7.23 ++ install-debian \ 7.24 ++ install-slitaz 7.25 + 7.26 + all: all-recursive 7.27 + 7.28 +--- vzctl-3.0.23-ori/etc/Makefile.am Thu Oct 30 14:24:43 2008 7.29 ++++ vzctl-3.0.23/etc/Makefile.am Mon Nov 16 21:43:03 2009 7.30 +@@ -43,6 +43,9 @@ 7.31 + 7.32 + install-debian: 7.33 + $(MAKE) $(AM_MAKEFLAGS) -C init.d $@ 7.34 ++ 7.35 ++install-slitaz: 7.36 ++ $(MAKE) $(AM_MAKEFLAGS) -C init.d $@ 7.37 + 7.38 + install-gentoo: 7.39 + $(MAKE) $(AM_MAKEFLAGS) -C init.d $@ 7.40 +--- vzctl-3.0.23-ori/etc/Makefile.in Thu Oct 30 14:24:49 2008 7.41 ++++ vzctl-3.0.23/etc/Makefile.in Mon Nov 16 21:43:03 2009 7.42 +@@ -563,6 +563,9 @@ 7.43 + install-debian: 7.44 + $(MAKE) $(AM_MAKEFLAGS) -C init.d $@ 7.45 + 7.46 ++install-slitaz: 7.47 ++ $(MAKE) $(AM_MAKEFLAGS) -C init.d $@ 7.48 ++ 7.49 + install-gentoo: 7.50 + $(MAKE) $(AM_MAKEFLAGS) -C init.d $@ 7.51 + $(mkinstalldirs) $(DESTDIR)$(sysconfdir)/conf.d 7.52 +--- vzctl-3.0.23-ori/etc/init.d/Makefile.am Thu Oct 30 14:24:43 2008 7.53 ++++ vzctl-3.0.23/etc/init.d/Makefile.am Mon Nov 16 21:46:42 2009 7.54 +@@ -31,6 +31,11 @@ 7.55 + 7.56 + install-debian: install-redhat 7.57 + 7.58 ++install-slitaz: 7.59 ++ $(mkinstalldirs) $(DESTDIR)$(initddir) 7.60 ++ $(INSTALL_SCRIPT) vz-redhat $(DESTDIR)$(initddir)/vz 7.61 ++ sed -e 's!/subsys!!' 7.62 ++ 7.63 + install-gentoo: vz-gentoo 7.64 + $(mkinstalldirs) $(DESTDIR)$(initddir) 7.65 + $(INSTALL_SCRIPT) vz-gentoo $(DESTDIR)$(initddir)/vz 7.66 +--- vzctl-3.0.23-ori/etc/init.d/Makefile.in Thu Oct 30 14:24:50 2008 7.67 ++++ vzctl-3.0.23/etc/init.d/Makefile.in Mon Nov 16 22:12:15 2009 7.68 +@@ -404,6 +404,11 @@ 7.69 + 7.70 + install-debian: install-redhat 7.71 + 7.72 ++install-slitaz: install-redhat 7.73 ++ sed -i -e 's!/subsys!!' $(DESTDIR)$(initddir)/vz 7.74 ++ sed -i -e 's/sysctl -q/sysctl -n/' $(DESTDIR)$(initddir)/vz 7.75 ++ 7.76 ++ 7.77 + install-gentoo: vz-gentoo 7.78 + $(mkinstalldirs) $(DESTDIR)$(initddir) 7.79 + $(INSTALL_SCRIPT) vz-gentoo $(DESTDIR)$(initddir)/vz 7.80 +--- vzctl-3.0.23-ori/scripts/vps-create.in Thu Oct 30 14:24:43 2008 7.81 ++++ vzctl-3.0.23/scripts/vps-create.in Mon Nov 16 22:26:20 2009 7.82 +@@ -37,7 +37,7 @@ 7.83 + vzerror "Tarball does not exist: $PRIVATE_TEMPLATE" ${VZ_FS_NEW_VE_PRVT} 7.84 + HEADER="$(od -A n -N 2 -t x1 -- "$PRIVATE_TEMPLATE")" || 7.85 + vzerror "Invalid tarball: $PRIVATE_TEMPLATE" ${VZ_FS_NEW_VE_PRVT} 7.86 +- TMP="$(df -P "$VE_PRVT")" || 7.87 ++ TMP="$(df "$VE_PRVT")" || 7.88 + vzerror "Failed to calculate available disk space on $VE_PRVT" ${VZ_FS_NEW_VE_PRVT} 7.89 + AVAIL="$(echo "$TMP" | awk 'END{print $4}')" 7.90 + if [ "$HEADER" = ' 1f 8b' ]; then 7.91 +--- vzctl-3.0.23-ori/scripts/vps-functions.in Thu Oct 30 14:24:43 2008 7.92 ++++ vzctl-3.0.23/scripts/vps-functions.in Mon Nov 16 22:25:52 2009 7.93 +@@ -126,10 +126,10 @@ 7.94 + 7.95 + route="$(${IP_CMD} route get "$1" |grep ' dev .* src ')" 7.96 + # match: $1 ... dev $dev ... 7.97 +- dev="$(echo "$route" |sed -ne '/ via /! s/^.* dev \+\([^ ]\+\) .*$/\1/p;Q')" 7.98 ++ dev="$(echo "$route" |sed -ne '/ via /! s/^.* dev \+\([^ ]\+\) .*$/\1/p;q')" 7.99 + [ -n "$dev" ] || 7.100 + # match: $1 ... via $1 ... dev $dev ... 7.101 +- dev="$(echo "$route" |sed -ne 's/^\([^ ]\+\) \(.* \)\?via \+\1 \(.* \)\?dev \+\([^ ]\+\) .*$/\4/p;Q')" 7.102 ++ dev="$(echo "$route" |sed -ne 's/^\([^ ]\+\) \(.* \)\?via \+\1 \(.* \)\?dev \+\([^ ]\+\) .*$/\4/p;q')" 7.103 + [ -n "$dev" ] || return 0 7.104 + 7.105 + for netdev in $NETDEVICES; do
8.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 8.2 +++ b/vzctl/stuff/vzctl-3.0.25.1-Makefile.u Fri Jan 21 00:56:18 2011 +0100 8.3 @@ -0,0 +1,133 @@ 8.4 +--- vzctl-3.0.25.1-ori/Makefile.am Fri Dec 24 12:45:32 2010 8.5 ++++ vzctl-3.0.25.1/Makefile.am Fri Dec 31 09:27:42 2010 8.6 +@@ -49,7 +49,8 @@ 8.7 + install-redhat \ 8.8 + install-gentoo \ 8.9 + install-suse \ 8.10 +- install-debian 8.11 ++ install-debian\ 8.12 ++ install-slitaz 8.13 + 8.14 + DISTRO_TARGETS_ALL = \ 8.15 + $(DISTRO_TARGETS) \ 8.16 +--- vzctl-3.0.25.1-ori/Makefile.in Fri Dec 24 12:45:44 2010 8.17 ++++ vzctl-3.0.25.1/Makefile.in Fri Dec 31 09:27:42 2010 8.18 +@@ -266,7 +266,8 @@ 8.19 + install-redhat \ 8.20 + install-gentoo \ 8.21 + install-suse \ 8.22 +- install-debian 8.23 ++ install-debian \ 8.24 ++ install-slitaz 8.25 + 8.26 + DISTRO_TARGETS_ALL = \ 8.27 + $(DISTRO_TARGETS) \ 8.28 +--- vzctl-3.0.25.1-ori/bin/Makefile.am Fri Dec 24 12:45:38 2010 8.29 ++++ vzctl-3.0.25.1/bin/Makefile.am Fri Dec 31 09:35:38 2010 8.30 +@@ -57,6 +57,8 @@ 8.31 + 8.32 + install-debian: 8.33 + 8.34 ++install-slitaz: 8.35 ++ 8.36 + install-gentoo: 8.37 + @echo 8.38 + @echo "***************************************************" 8.39 +--- vzctl-3.0.25.1-ori/bin/Makefile.in Fri Dec 24 12:45:43 2010 8.40 ++++ vzctl-3.0.25.1/bin/Makefile.in Fri Dec 31 09:35:39 2010 8.41 +@@ -530,6 +530,8 @@ 8.42 + 8.43 + install-debian: 8.44 + 8.45 ++install-slitaz: 8.46 ++ 8.47 + install-gentoo: 8.48 + @echo 8.49 + @echo "***************************************************" 8.50 +--- vzctl-3.0.25.1-ori/etc/Makefile.am Fri Dec 24 12:45:34 2010 8.51 ++++ vzctl-3.0.25.1/etc/Makefile.am Fri Dec 31 09:27:42 2010 8.52 +@@ -50,3 +50,6 @@ 8.53 + $(MAKE) $(AM_MAKEFLAGS) -C init.d $@ 8.54 + $(mkinstalldirs) $(DESTDIR)$(sysconfdir)/conf.d 8.55 + $(LN_S) $(pkgconfdir)/vz.conf $(DESTDIR)$(sysconfdir)/conf.d/vz 8.56 ++ 8.57 ++install-slitaz: 8.58 ++ $(MAKE) $(AM_MAKEFLAGS) -C init.d $@ 8.59 +--- vzctl-3.0.25.1-ori/etc/Makefile.in Fri Dec 24 12:45:43 2010 8.60 ++++ vzctl-3.0.25.1/etc/Makefile.in Fri Dec 31 09:27:42 2010 8.61 +@@ -683,6 +683,10 @@ 8.62 + $(mkinstalldirs) $(DESTDIR)$(sysconfdir)/conf.d 8.63 + $(LN_S) $(pkgconfdir)/vz.conf $(DESTDIR)$(sysconfdir)/conf.d/vz 8.64 + 8.65 ++install-slitaz: 8.66 ++ $(MAKE) $(AM_MAKEFLAGS) -C init.d $@ 8.67 ++ 8.68 ++ 8.69 + # Tell versions [3.59,3.63) of GNU make to not export all variables. 8.70 + # Otherwise a system limit (for SysV at least) may be exceeded. 8.71 + .NOEXPORT: 8.72 +--- vzctl-3.0.25.1-ori/etc/init.d/Makefile.am Fri Dec 24 12:45:34 2010 8.73 ++++ vzctl-3.0.25.1/etc/init.d/Makefile.am Fri Dec 31 09:27:42 2010 8.74 +@@ -33,6 +33,8 @@ 8.75 + 8.76 + install-debian: install-redhat 8.77 + 8.78 ++install-slitaz: install-redhat 8.79 ++ 8.80 + install-gentoo: vz-gentoo vzeventd-gentoo 8.81 + $(mkinstalldirs) $(DESTDIR)$(initddir) 8.82 + $(INSTALL_SCRIPT) vz-gentoo $(DESTDIR)$(initddir)/vz 8.83 +--- vzctl-3.0.25.1-ori/etc/init.d/Makefile.in Fri Dec 24 12:45:43 2010 8.84 ++++ vzctl-3.0.25.1/etc/init.d/Makefile.in Fri Dec 31 09:27:40 2010 8.85 +@@ -492,6 +492,8 @@ 8.86 + 8.87 + install-debian: install-redhat 8.88 + 8.89 ++install-slitaz: install-redhat 8.90 ++ 8.91 + install-gentoo: vz-gentoo vzeventd-gentoo 8.92 + $(mkinstalldirs) $(DESTDIR)$(initddir) 8.93 + $(INSTALL_SCRIPT) vz-gentoo $(DESTDIR)$(initddir)/vz 8.94 +--- vzctl-3.0.25.1-ori/etc/init.d/initd-functions.in Fri Dec 24 12:45:35 2010 8.95 ++++ vzctl-3.0.25.1/etc/init.d/initd-functions.in Sun Jan 2 14:29:21 2011 8.96 +@@ -28,6 +28,9 @@ 8.97 + elif [ -r /etc/debian_version ]; then 8.98 + DISTR=debian 8.99 + VARLOCK=/var/lock 8.100 ++elif [ -r /etc/slitaz-release ]; then 8.101 ++ DISTR=slitaz 8.102 ++ VARLOCK=/var/lock 8.103 + fi 8.104 + 8.105 + print_success() 8.106 +--- vzctl-3.0.25.1-ori/etc/init.d/vz-redhat.in Fri Dec 24 12:45:35 2010 8.107 ++++ vzctl-3.0.25.1/etc/init.d/vz-redhat.in Fri Dec 31 14:50:22 2010 8.108 +@@ -189,7 +189,7 @@ 8.109 + if [ "${IPV6}" = "yes" ]; then 8.110 + ip -6 addr add fe80::1/128 dev $VZDEV 8.111 + fi 8.112 +- sysctl -q -w net.ipv4.conf.$VZDEV.send_redirects=0 8.113 ++ sysctl -w net.ipv4.conf.$VZDEV.send_redirects=0 8.114 + if [ "$(sysctl -n -e net.ipv4.ip_forward)" != "1" ]; then 8.115 + print_warning "IP forwarding is not enabled" 8.116 + fi 8.117 +@@ -242,7 +242,7 @@ 8.118 + need_restart="" 8.119 + velist=$(vzlist -aH -octid,onboot -s-bootorder | 8.120 + awk '$2 == "yes" {print $1}') 8.121 +- sysctl -q -w net.ipv4.route.src_check=0 8.122 ++ sysctl -w net.ipv4.route.src_check=0 8.123 + for veid in $velist; do 8.124 + [ "${veid}" = "0" ] && continue 8.125 + __echo "Starting CT ${veid}: " 8.126 +--- vzctl-3.0.25.1-ori/scripts/vps-create.in Fri Dec 24 12:45:37 2010 8.127 ++++ vzctl-3.0.25.1/scripts/vps-create.in Fri Dec 31 14:53:35 2010 8.128 +@@ -38,7 +38,7 @@ 8.129 + vzerror "Tarball does not exist: $PRIVATE_TEMPLATE" ${VZ_FS_NEW_VE_PRVT} 8.130 + HEADER="$(od -A n -N 2 -t x1 -- "$PRIVATE_TEMPLATE")" || 8.131 + vzerror "Invalid tarball: $PRIVATE_TEMPLATE" ${VZ_FS_NEW_VE_PRVT} 8.132 +- TMP="$(df -P "$VE_PRVT")" || 8.133 ++ TMP="$(df "$VE_PRVT")" || 8.134 + vzerror "Failed to calculate available disk space on $VE_PRVT" ${VZ_FS_NEW_VE_PRVT} 8.135 + AVAIL="$(echo "$TMP" | awk 'END{print $4}')" 8.136 + if [ "$HEADER" = ' 1f 8b' ]; then