From f1a49f8b2b076390bcaca6968f50d490715439e4 Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Mon, 10 Oct 2011 08:20:16 +0200 Subject: [PATCH] do not install ve-pve.auto.conf-sample --- debian/conffiles | 1 - www/templates/Makefile | 12 ++----- www/templates/generate.pl | 69 --------------------------------------- 3 files changed, 3 insertions(+), 79 deletions(-) delete mode 100755 www/templates/generate.pl diff --git a/debian/conffiles b/debian/conffiles index 2759dcdac..46c28fb88 100644 --- a/debian/conffiles +++ b/debian/conffiles @@ -5,5 +5,4 @@ /etc/cron.daily/pve /etc/apache2/sites-available/pve.conf /etc/apache2/sites-available/pve-redirect.conf -/etc/vz/conf/ve-pve.auto.conf-sample /etc/vz/vznet.conf diff --git a/www/templates/Makefile b/www/templates/Makefile index 7e56bbdbd..56131775f 100644 --- a/www/templates/Makefile +++ b/www/templates/Makefile @@ -1,16 +1,10 @@ include ../../defines.mk -all: ve-pve.auto.conf-sample - -ve-pve.auto.conf-sample: generate.pl - ./generate.pl 256 > $@.tmp - echo FIXME: vzcfgvalidate $@.tmp - mv $@.tmp $@ +all: .PHONY: install -install: ve-pve.auto.conf-sample pve.conf pve-redirect.conf +install: pve.conf pve-redirect.conf install -d ${DESTDIR}/etc/vz/conf - install -m 0644 ve-pve.auto.conf-sample ${DESTDIR}/etc/vz/conf install -d ${DESTDIR}/etc/apache2/sites-available/ install -m 0644 pve.conf pve-redirect.conf ${DESTDIR}/etc/apache2/sites-available/ @@ -19,4 +13,4 @@ distclean: clean .PHONY: clean clean: - rm -rf *~ ve-pve.auto.conf-sample ve-pve.auto.conf-sample.tmp + rm -rf *~ diff --git a/www/templates/generate.pl b/www/templates/generate.pl deleted file mode 100755 index e74e785ae..000000000 --- a/www/templates/generate.pl +++ /dev/null @@ -1,69 +0,0 @@ -#!/usr/bin/perl -w - -use strict; - -use POSIX qw (LONG_MAX); - -my $max = LONG_MAX; -my $nolimit = "\"$max:$max\""; - -my $defaults = { - - 128 => {}, - 256 => {}, - 512 => {}, - 1024 => {}, - 2048 => {}, - -}; - -my $mem = $ARGV[0]; - -die "unknown memory size" if !defined ($defaults->{$mem}); - -print "# PVE default config for ${mem}MB RAM\n\n"; - -print "ONBOOT=\"no\"\n"; - -print "\n# Primary parameters\n"; -print "NUMPROC=\"1024:1024\"\n"; -print "NUMTCPSOCK=$nolimit\n"; -print "NUMOTHERSOCK=$nolimit\n"; - -my $vmguarpages = int ($mem*1024/4); -print "VMGUARPAGES=\"$vmguarpages:$max\"\n"; - -print "\n# Secondary parameters\n"; - -print "KMEMSIZE=$nolimit\n"; - -my $privmax = int ($vmguarpages*1.1); -$privmax = $vmguarpages + 12500 if ($privmax-$vmguarpages) > 12500; -print "OOMGUARPAGES=\"$vmguarpages:$max\"\n"; -print "PRIVVMPAGES=\"$vmguarpages:$privmax\"\n"; - -print "TCPSNDBUF=$nolimit\n"; -print "TCPRCVBUF=$nolimit\n"; -print "OTHERSOCKBUF=$nolimit\n"; -print "DGRAMRCVBUF=$nolimit\n"; - -print "\n# Auxiliary parameters\n"; -print "NUMFILE=$nolimit\n"; -print "NUMFLOCK=$nolimit\n"; -print "NUMPTY=\"255:255\"\n"; -print "NUMSIGINFO=\"1024:1024\"\n"; -print "DCACHESIZE=$nolimit\n"; -print "LOCKEDPAGES=$nolimit\n"; -print "SHMPAGES=$nolimit\n"; -print "NUMIPTENT=$nolimit\n"; -print "PHYSPAGES=\"0:$max\"\n"; - -print "\n# Disk quota parameters\n"; -print "DISKSPACE=$nolimit\n"; -print "DISKINODES=$nolimit\n"; -print "QUOTATIME=\"0\"\n"; -print "QUOTAUGIDLIMIT=\"0\"\n"; - -print "\n# CPU fair sheduler parameter\n"; -print "CPUUNITS=\"1000\"\n"; -print "CPUS=\"1\"\n";