Commit 5910d3b7 authored by Dietmar Maurer's avatar Dietmar Maurer

imported from svn 'pve-manager/pve2'

parents
This diff is collapsed.
AUTOMAKE_OPTIONS = foreign
include $(top_builddir)/common.mk
SUBDIRS = bin lib www aplinfo po
DEB=${PACKAGE}_${VERSION}-${PACKAGERELEASE}_all.deb
CDATE:=$(shell date +%F)
SNAP=${PACKAGE}-${VERSION}-${CDATE}.tar.gz
vzconf_SCRIPTS = vznet.conf
vzconfdir = /etc/vz
.PHONY: dinstall
dinstall: ${DEB}
dpkg -i ${DEB}
country.dat: country.pl
./country.pl > country.dat
.PHONY: ${DEB}
${DEB} deb:
./autogen.sh
./configure
make clean
rm -rf dest
mkdir dest
make DESTDIR=`pwd`/dest install-strip
mkdir dest/DEBIAN
install -m 0644 debian/control dest/DEBIAN
install -m 0644 debian/conffiles dest/DEBIAN
install -m 0755 debian/config dest/DEBIAN
install -m 0644 debian/templates dest/DEBIAN
install -m 0755 debian/postinst dest/DEBIAN
install -m 0755 debian/prerm dest/DEBIAN
install -m 0755 debian/postrm dest/DEBIAN
install -m 0644 debian/triggers dest/DEBIAN
gzip --best dest/usr/share/man/*/*
gzip --best dest/usr/share/doc/${PACKAGE}/changelog.Debian
dpkg-deb --build dest
mv dest.deb ${DEB}
rm -rf dest
lintian ${DEB}
.PHONY: upload
upload: ${DEB}
umount /pve/${RELEASE}; mount /pve/${RELEASE} -o rw
mkdir -p /pve/${RELEASE}/extra
rm -f /pve/${RELEASE}/extra/${PACKAGE}_*.deb
rm -f /pve/${RELEASE}/extra/Packages*
cp ${DEB} /pve/${RELEASE}/extra
cd /pve/${RELEASE}/extra; dpkg-scanpackages . /dev/null > Packages; gzip -9c Packages > Packages.gz
umount /pve/${RELEASE}; mount /pve/${RELEASE} -o ro
.PHONY: poupload
poupload:
rsync po/*.po po/pve-manager.pot pve.proxmox.com:/home/ftp/sources/po-files/
.PHONY: aplupload
aplupload:
./aplinfo/apltest.pl
gpg -bas -u support@proxmox.com aplinfo/aplinfo.dat
gzip -c aplinfo/aplinfo.dat > aplinfo.dat.gz
scp aplinfo/aplinfo.dat aplinfo.dat.gz aplinfo/aplinfo.dat.asc pve.proxmox.com:/home/ftp/appliances/
install-data-local: country.dat
mkdir -p ${DESTDIR}/usr/share/${PACKAGE}
mkdir -p ${DESTDIR}/usr/share/doc/${PACKAGE}
mkdir -p ${DESTDIR}/var/lib/${PACKAGE}
mkdir -p ${DESTDIR}/var/lib/vz/images
mkdir -p ${DESTDIR}/var/lib/vz/template/cache
mkdir -p ${DESTDIR}/var/lib/vz/template/iso
mkdir -p ${DESTDIR}/var/lib/vz/template/qemu
install -m 0644 copyright ${DESTDIR}/usr/share/doc/${PACKAGE}
install -m 0644 debian/changelog.Debian ${DESTDIR}/usr/share/doc/${PACKAGE}
install -m 0644 country.dat ${DESTDIR}/usr/share/${PACKAGE}
CLEANFILES=*~ *.deb debian/*~ dest ${PACKAGE}-*.tar.gz ${SNAP} country.dat
.PHONY: snap
${SNAP} snap: clean
rm -f ../${SNAP}
cd ..; tar cvzf ${SNAP} --exclude .svn --exclude autom4te.cache ${PACKAGE}
mv ../${SNAP} ${SNAP}
.PHONY: uploadsnap
uploadsnap: ${SNAP}
scp ${SNAP} pve.proxmox.com:/home/ftp/sources/
#ACLOCAL_AMFLAGS = -I m4
#EXTRA_DIST = config.rpath m4/ChangeLog
PROXMOX VIRTUAL ENVIRONMENT (PVE)
=================================
TODO:
* improve API Dokumentation viewer
- include CLI Tool docs
- write a widget to render a JSON Schema (parameters, returns)
* use nginx/fastcgi instead of apache2 to save resources?
* impl. logfile search (like pmg tracking center)
RELATED TASKS:
* vncterm:
implement all vt220/xterm commands,
add regression test suite,
* qemu image resize tool?
* vmware image importer
* vnc client: the java implementation takes long time to load
- can we speedup that?
- test http://www.wizhelp.com/flashlight-vnc/ with vncterm
- test http://novnc.com/novnc/ novnc
- provide custom controls to select 'cdrom'?
* generate appliances
This diff is collapsed.
include $(top_builddir)/common.mk
aplinfo_DATA = aplinfo.dat support@proxmox.com.pubkey
CLEANFILES = *~ aplinfo.dat.gz aplinfo.dat.asc
aplinfodir = /usr/share/doc/pve-manager
Package sources
===============
debian and ubuntu packages are built using 'dab'
Other packages are from:
http://download.openvz.org/template/precreated/contrib/
centos-4-i386-default-4.7-20090117.tar.gz => centos-4-standard_4.7-1_i386.tar.gz
centos-5-i386-default-5.2-20090117.tar.gz => centos-5-standard_5.2-1_i386.tar.gz
fedora-9-i386-default-20090108.tar.gz => fedora-9-standard_9-2_i386.tar.gz
PVE Package description format
==============================
We basically use a debian like format - see:
http://www.debian.org/doc/debian-policy/ch-controlfields.html
The following (debian) field are used:
Package, Section, Version, Maintainer, Description
Additionally we define the following fields:
Type: openvz | qemu
OS: Operating system type
Location: download url
Infopage: url to additional info
ManageUrl: url to connect to management interface
md5sum: md5sum of the package
Here is an example:
Package: proxmox-mailgateway
Version: 2.4-2
Type: openvz
OS: debian-4.0
Section: mail
Certified: yes
Maintainer: Proxmox Support Team <support@proxmox.com>
Location: http://download.proxmox.com/appliances/mail/debian-4.0-proxmox-mailgateway_2.4-2_i386.tar.gz
Infopage: http://pve.proxmox.com/wiki/Proxmox_Mail_Gateway
ManageUrl: https://__IPADDRESS__/
md5sum: 3b48ffe08347229a854bc8d5ee161e1f
Description: Proxmox Mail Gateway
A full featured mail proxy for spam an virus filtering.
The filename is automatically generated from the above description:
${OS}-${Package}_${VERSION}_i386.tar.gz
If ${Package} starts with "${OS}-", the filename is:
${Package}_${VERSION}_i386.tar.gz
\ No newline at end of file
Package: pve-web-news
Description: News displayed on the admin interface
<b>Welcome</b> to the Proxmox Virtual Environment!<br><br>
For more information please visit our homepage at
<a href='http://www.proxmox.com' target='_blank'>www.proxmox.com</a>
Package: debian-4.0-standard
Version: 4.0-5
Type: openvz
OS: debian-4.0
Section: system
Maintainer: Proxmox Support Team <support@proxmox.com>
Location: http://download.proxmox.com/appliances/system/debian-4.0-standard_4.0-5_i386.tar.gz
Infopage: http://pve.proxmox.com/wiki/Debian_4.0_Standard
md5sum: 57d47231719f2117514dffbeb736440e
Description: Debian 4.0 (standard)
A small Debian Etch system including all standard packages.
Package: debian-5.0-standard
Version: 5.0-2
Type: openvz
OS: debian-5.0
Section: system
Maintainer: Proxmox Support Team <support@proxmox.com>
Location: http://download.proxmox.com/appliances/system/debian-5.0-standard_5.0-2_i386.tar.gz
Infopage: http://pve.proxmox.com/wiki/Debian_5.0_Standard
md5sum: 1b7b57208bfa486cb84e39f765e0c1bb
Description: Debian 5.0 (standard)
A small Debian Lenny system including all standard packages.
Package: debian-6.0-standard
Version: 6.0-1
Type: openvz
OS: debian-6.0
Section: system
Maintainer: Proxmox Support Team <support@proxmox.com>
Location: http://download.proxmox.com/appliances/system/debian-6.0-standard_6.0-1_i386.tar.gz
Infopage: http://pve.proxmox.com/wiki/Debian_6.0_Standard
md5sum: 08a616ab67ab618f2528b654ef2b28c2
Description: Debian 6.0 (standard)
A small Debian Squeeze system including all standard packages.
Package: centos-4-standard
Version: 4.7-1
Type: openvz
OS: centos-4
Section: system
Location: http://download.proxmox.com/appliances/system/centos-4-standard_4.7-1_i386.tar.gz
Infopage: http://pve.proxmox.com/wiki/CentOS_4_Standard
md5sum: 49ff5ac1ae0f03e8ab28eafdc050e85f
Description: CentOS 4 (standard)
A small CentOS system.
Package: centos-5-standard
Version: 5.2-1
Type: openvz
OS: centos-5
Section: system
Location: http://download.proxmox.com/appliances/system/centos-5-standard_5.2-1_i386.tar.gz
Infopage: http://pve.proxmox.com/wiki/CentOS_5_Standard
md5sum: 5d3ef1bda953b7e9c832236413d9c048
Description: CentOS 5 (standard)
A small CentOS system.
Package: fedora-9-standard
Version: 9-2
Type: openvz
OS: fedora-9
Section: system
Location: http://download.proxmox.com/appliances/system/fedora-9-standard_9-2_i386.tar.gz
Infopage: http://pve.proxmox.com/wiki/Fedora_9_Standard
md5sum: c5f127253345fb693ab0271bba94a82f
Description: Fedora 9 (standard)
A small Fedora system.
Package: proxmox-mailgateway
Version: 2.4-2
Type: openvz
OS: debian-4.0
Section: mail
Certified: yes
Maintainer: Proxmox Support Team <support@proxmox.com>
Location: http://download.proxmox.com/appliances/mail/debian-4.0-proxmox-mailgateway_2.4-2_i386.tar.gz
Infopage: http://pve.proxmox.com/wiki/Proxmox_Mail_Gateway
ManageUrl: https://__IPADDRESS__/
md5sum: 3b48ffe08347229a854bc8d5ee161e1f
Description: Proxmox Mail Gateway
A full featured mail proxy for spam an virus filtering.
Package: mediawiki
Version: 1.15-1
Type: openvz
OS: debian-5.0
Section: www
Maintainer: Proxmox Support Team <support@proxmox.com>
Location: http://download.proxmox.com/appliances/www/debian-5.0-mediawiki_1.15-1_i386.tar.gz
Infopage: http://pve.proxmox.com/wiki/MediaWiki
ManageUrl: http://__IPADDRESS__/
md5sum: acc4957cc8494d9be842ab5b82c9072c
Description: MediaWiki
MediaWiki is a wiki engine (a program for creating a collaboratively
edited website). It is designed to handle heavy websites containing
library-like document collections, and supports user uploads of
images/sounds, multilingual content, TOC autogeneration, ISBN links,
etc.
Package: cyan-sweb
Version: 1.7.16-1
Type: openvz
OS: ubuntu-8.04
Section: www
Certified: yes
Maintainer: Proxmox Support Team <support@proxmox.com>
Location: http://download.proxmox.com/appliances/www/ubuntu-8.04-cyan-sweb_1.7.16-1_i386.tar.gz
Infopage: http://pve.proxmox.com/wiki/CYAN_Secure_Web
ManageUrl: https://__IPADDRESS__:9992/
md5sum: 34fc1858472d743c82ae3146f7e21758
Description: CYAN Secure Web
CYAN Secure Web is a high performance proxy server,
which is designed to provide adaptive security and
to meet scalable web filtering needs. The powerful
all-in-one solution protects your company from the
already existing, as well as from the continually
emerging web-based threats and inappropriate web
usage.
Package: joomla
Version: 1.5.15-1
Type: openvz
OS: debian-5.0
Section: www
Maintainer: Proxmox Support Team <support@proxmox.com>
Location: http://download.proxmox.com/appliances/www/debian-5.0-joomla_1.5.15-1_i386.tar.gz
Infopage: http://pve.proxmox.com/wiki/Joomla!
ManageUrl: http://__IPADDRESS__/
md5sum: 351668b0fc5021484cde465cfd5d30c9
Description: Joomla! Content Management
Joomla! is one of the most powerful Open Source Content Management
Systems on the planet. It is used all over the world for everything from
simple websites to complex corporate applications. Joomla! is easy to
install, simple to manage, and reliable.
Package: ubuntu-8.04-standard
Version: 8.04-3
Type: openvz
OS: ubuntu-8.04
Section: system
Location: http://download.proxmox.com/appliances/system/ubuntu-8.04-standard_8.04-3_i386.tar.gz
Infopage: http://pve.proxmox.com/wiki/Ubuntu_Hardy_Standard
md5sum: 2c8ba5f36e94d95f3d0d535489f60e77
Description: Ubuntu Hardy (standard)
A small Ubuntu Hardy system including all standard packages.
Package: drupal
Version: 6.14-1
Type: openvz
OS: debian-5.0
Section: www
Maintainer: Proxmox Support Team <support@proxmox.com>
Location: http://download.proxmox.com/appliances/www/debian-5.0-drupal_6.14-1_i386.tar.gz
Infopage: http://pve.proxmox.com/wiki/Drupal
ManageUrl: http://__IPADDRESS__/
md5sum: 557a4ab4d0adb998bf7fcd31219e9a0a
Description: Drupal Content Management
Drupal is a free software package that allows an individual or a
community of users to easily publish, manage and organize a wide
variety of content on a website. Tens of thousands of people and
organizations are using Drupal to power scores of different web sites,
including community web portals, discussion sites, corporate web sites,
intranet applications, personal web sites or blogs, ...
Package: acquia
Version: 1.2.21-1
Type: openvz
OS: debian-5.0
Section: www
Maintainer: Proxmox Support Team <support@proxmox.com>
Location: http://download.proxmox.com/appliances/www/debian-5.0-acquia_1.2.21-1_i386.tar.gz
Infopage: http://pve.proxmox.com/wiki/Acquia_Drupal
ManageUrl: http://__IPADDRESS__/
md5sum: 495c16fae7a3ebaff24cdad6538ca0c9
Description: Acquia Drupal Content Management
Acquia Drupal is a commercially supported distribution of the open
source Drupal social publishing system. A packaged collection of some
of the best software from the Drupal community, Acquia Drupal offers
you an advanced starting point to quickly begin building Drupal
websites.
Package: sugarcrm
Version: 5.5.0-1
Type: openvz
OS: debian-5.0
Section: www
Maintainer: Proxmox Support Team <support@proxmox.com>
Location: http://download.proxmox.com/appliances/www/debian-5.0-sugarcrm_5.5.0-1_i386.tar.gz
Infopage: http://pve.proxmox.com/wiki/SugarCRM
ManageUrl: http://__IPADDRESS__/
md5sum: 84b25f39d70ff4b72e155a3f4cd96cf0
Description: SugarCRM customer relationship management
SugarCRM is the world's leading provider of commercial open source
customer relationship management (CRM) software for companies of all
sizes. Sugar easily adapts to any business environment by offering a
more flexible, cost-effective alternative than proprietary
applications. SugarCRM's open source architecture allows companies to
more easily customize and integrate customer-facing business processes
in order to build and maintain more profitable relationships.
Package: zenoss
Version: 2.5.1-1
Type: openvz
OS: ubuntu-8.04
Section: admin
Maintainer: Proxmox Support Team <support@proxmox.com>
Location: http://download.proxmox.com/appliances/admin/ubuntu-8.04-zenoss_2.5.1-1_i386.tar.gz
Infopage: http://pve.proxmox.com/wiki/Zenoss
ManageUrl: http://__IPADDRESS__:8080/
md5sum: 025957c3e99267623c168331a57fee8f
Description: Zenoss Core IT monitoring
Zenoss Core is an award-winning open source IT monitoring product
that delivers the functionality to effectively manage the
configuration, health and performance of networks, servers and
applications through a single, integrated software package.
Package: request-tracker
Version: 3.8.7-1
Type: openvz
OS: debian-6.0
Section: admin
Maintainer: Proxmox Support Team <support@proxmox.com>
Location: http://download.proxmox.com/appliances/admin/debian-6.0-request-tracker_3.8.7-1_i386.tar.gz
Infopage: http://pve.proxmox.com/wiki/RT_Request_Tracker
ManageUrl: http://__IPADDRESS__/rt/
md5sum: 155f824dce64337d04678b3bc2fa41ef
Description: Extensible trouble-ticket tracking system
Request Tracker (RT) is an enterprise-grade ticketing system which
enables a group of people to intelligently and efficiently manage
tasks, issues, and requests submitted by a community of users. It
features a web, email and command-line interfaces.
Package: wordpress
Version: 2.9-1
Type: openvz
OS: debian-5.0
Section: www
Maintainer: Proxmox Support Team <support@proxmox.com>
Location: http://download.proxmox.com/appliances/www/debian-5.0-wordpress_2.9-1_i386.tar.gz
Infopage: http://pve.proxmox.com/wiki/Wordpress
ManageUrl: http://__IPADDRESS__/
md5sum: 362697bfa8821f6c736320544cbb9232
Description: Wordpress
WordPress is a state-of-the-art publishing platform with a
focus on aesthetics, web standards, and usability.
WordPress is both free and priceless at the same time.
#!/usr/bin/perl -w
use strict;
use PVE::APLInfo;
my $pkglist = PVE::APLInfo::load_data();
my $err = 0;
foreach my $k (keys %{$pkglist->{'all'}}) {
next if $k eq 'pve-web-news';
my $res = $pkglist->{'all'}->{$k};
my $template = "$res->{os}-$res->{package}_$res->{version}_i386.tar.gz";
$template =~ s/$res->{os}-$res->{os}-/$res->{os}-/;
if ($k ne $template) {
print "ERROR: $k != $template\n";
$err = 1;
}
}
$err ? exit (-11) : exit (0);
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.2.4 (GNU/Linux)
mQGiBEDaxwIRBAC7x6eHR6C0A+C5i3pQcuAENN78LV2uOG2I+xhwXtM8re7+mxbF
WzidB0w/RDGUbG+wKHTEoXGF/vA6HNm7VZ+YAC/7NdChKVfdHIVGsWM33jj7uMl/
rrt9kBjyeeQtqQv01Ctbm+gfvtW15dVVSlcMD7krj8CFSySlgLZizKEW/wCgzd1h
dreLfCiTI8mzvpc1IeGkYj8D+gPCDXWgaHf+IIlg8nS1i0CASsQygz9iLuSMQy7M
uppirMpArrUU6knjN3tSV8VvTleMgel2SgHglL+PdjNKcV97MM/HiE73P3Nv7fGz
Kp2kxpBD3h0ABA2yz5voAOTe0Gdtaweot7J/14dFV81i1Tkx6eD2/eHihMhyjyxq
n1+vA/4hW57bY5Tvv9/H8CNztSlfhzchtV0D/AV2O3zLLzGUHo+o0NZR9tLoZDrl
5BLqzTi+oz+uGfx/te5O3Fnyxvs8a2tZW3NtyYxLV5agrGJLP77cIZRKIioH4wDu
KWwbeAgdh/9y7SdBLK5V5tuIxO8iK3Mf8ZL1rychm8H7NoD2qbYAAAAqUHJveG1v
eCBTdXBwb3J0IFRlYW0gPHN1cHBvcnRAcHJveG1veC5jb20+iF4EExECAB4FAkDa
xwICGwMGCwkIBwMCAxUCAwMWAgECHgECF4AACgkQsMHMIlyscv6vlwCgosA0VzMU
seMaIHMA2Y09wtbzDOkAoIRnk/pgnsV9YDXkAn3wSmlBX6UnuQINBEDaxw8QCACY
QpNoaRrwxG0ybLnjbafhsxfRlxPW4AwQqbElDndaui+ZZD2Uh0+UQ3cCr99/+0xe
WzSsFtgGCzfBP1cekqvYRQwFnpup9CsBR/7ktF/DvpoZEH2TOZxO2jT4LM2TlSAO
LheqBqXMeEDLj8PVuokc3M9Zoyh7FAhY06be/teI+Rk/KkwsM0FnmZQ8HJVHbX93
Et67tp6+BJ3C6w2PyxbQS6W25megOmQ6+9NpXw3TM0fY0018s/bjxILPyXdF3qlV
S9CrxtW5IxknGGEsOdR7hQHL9Rmt63oHnC8uj3qqDjjq4oiMPrhORRZXg+ywsQWT
XCkbCieq6XYjz9GpSgL/AAMFB/9xmMUgPgwK3+3tpgsB9kHEvUfJ0pqkREugCELz
dmTI8zDeGhUvlEVoNBg1sbiKQz3ENqtBVdlciQsTRv6FXgjH7iqTs3PjysaOAcbl
rqqob0LePszDzSqHhqGy1lELUm948ipHcjQ/swsv0lg7bNgX4VjDFMiGhbKzOqB2
1aPp0qMeyYotoHsLQPO3y08vw6sFvaE8TN30h9+ZRALkHLJv59vv1PcOZZ3CiGi/
jdU5588ue8j1Qbtapk4aTL5p1vUd+QQf04cdf2K8N+oRu9C0Uao5ztnx+4O8DoQ8
FUhDZJK8tFQVc3gT+3erZcriM6lnQGuYCUBI4rKAphz2tAX+iEkEGBECAAkFAkDa
xw8CGwwACgkQsMHMIlyscv5/eACePKHWiywt9xUailoOx4R3+8se8v8AmwYKs1GW
0RvgrughQeHV+m60PEOl
=o8Uk
-----END PGP PUBLIC KEY BLOCK-----
#!/bin/sh
# Refresh GNU autotools toolchain.
for i in config.guess config.sub missing install-sh mkinstalldirs ; do
test -r /usr/share/automake-1.9/${i} && {
rm -f ${i}
cp /usr/share/automake-1.9/${i} .
}
chmod 755 ${i}
done
aclocal
#aclocal -I m4
#aclocal -I cmulocal
#autoheader
automake --foreign --add-missing
autoconf
exit 0
include $(top_builddir)/common.mk
SUBDIRS = init.d cron test
bin_SCRIPTS = \
pvestatd \
pvesh \
pveam \
pvebanner \
pvectl \
pvedaemon \
pveversion \
pveperf
man_MANS = \
pvestatd.1 \
pvedaemon.1 \
pveversion.1 \
pveperf.1
CLEANFILES = $(man_MANS) *~
bindir = /usr/bin
install-exec-hook:
perl -I$(top_builddir)/lib ./pvesh verifyapi
This diff is collapsed.
SUBDIRS = daily
\ No newline at end of file
include $(top_builddir)/common.mk
crondaily_SCRIPTS = pve
crondailydir = /etc/cron.daily
CLEANFILES = *~
#!/usr/bin/perl -w
use strict;
#use PVE::APLInfo;
use PVE::SafeSyslog;
use IO::File;
use File::Find;
use File::stat;
initlog ('pvedailycron', 'daemon');
# fixme: update APL info?
#my $pvecfg = PVE::Config::read_file('pvecfg');
#my $proxy = ($pvecfg && $pvecfg->{http_proxy}) ? $pvecfg->{http_proxy} : undef;
## update appliance info
#if (!PVE::APLInfo::update()) {
# syslog ('err', "update appliance info failed - see /var/log/pveam.log for details");
#}
sub cleanup_tasks {
my $taskdir = "/var/log/pve/tasks";
my $filename = "$taskdir/index.1";
my $fh = IO::File->new($filename, O_RDONLY);
return if !$fh;
my $endtime = 0;
while (defined(my $line = <$fh>)) {
if ($line =~ m/^(\S+)(\s([0-9A-Za-z]{8})(\s(\S.*))?)?$/) {
$endtime = hex($3);
last;
}
}
close($fh);
return if !$endtime;
# print "delete task older that $endtime\n" . localtime($endtime) . "\n";
my $count = 0;
my $wanted = sub {
my $filename = $_;
return if $filename !~ m/^UPID:/;
my $st;
if (($st = stat($filename)) && ($st->mtime < $endtime)) {
unlink($filename);
$count++;
}
};
foreach my $subdir (qw(0 1 2 3 4 5 6 7 8 9 A B C F E F)) {
my $path = "$taskdir/$subdir";
find($wanted, $path);
}
if ($count) {
syslog('info', "cleanup removed $count task logs");
}
}
cleanup_tasks();
exit (0);
include $(top_builddir)/common.mk
initdbin_SCRIPTS = \
pvedaemon \
pvebanner \
pvestatd \
pvenetcommit
initdbindir = /etc/init.d/
CLEANFILES=*~
\ No newline at end of file
This diff is collapsed.
#!/bin/sh
### BEGIN INIT INFO
# Provides: pvebanner
# Required-Start: $all
# Required-Stop:
# Default-Start: 2 3 4 5
# Default-Stop:
# Short-Description: print PVE banner
### END INIT INFO
. /lib/lsb/init-functions
PATH=/sbin:/bin:/usr/bin:/usr/sbin
test -f $PVEDAEMON || exit 0
case "$1" in
start)
pvebanner
;;
stop|restart|force-reload)
exit 1
;;
*)
echo "Usage: /etc/init.d/pvebanner {start}"
exit 1
;;
esac
exit 0
#!/bin/sh
### BEGIN INIT INFO
# Provides: pvedaemon
# Required-Start: $remote_fs $network $syslog pve-cluster
# Required-Stop: $remote_fs $network $syslog pve-cluster
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: PVE Daemon
### END INIT INFO
. /lib/lsb/init-functions
PATH=/sbin:/bin:/usr/bin:/usr/sbin
DAEMON=/usr/bin/pvedaemon
NAME=pvedaemon
DESC="PVE Daemon"
PIDFILE=/var/run/pvedaemon.pid
test -f $DAEMON || exit 0
# avoid warnings about uninstalled locales when pvedaemon executes commands
export LC_ALL="C"
case "$1" in
start)
log_daemon_msg "Starting $DESC" "$NAME"
start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON
log_end_msg $?
;;
stop)
log_daemon_msg "Stopping $DESC" "$NAME"
start-stop-daemon --stop --quiet --retry TERM/2/TERM/10/KILL/2 --pidfile $PIDFILE
log_end_msg $?
;;
reload)
log_daemon_msg "Reloading $DESC" "$NAME"
if ( [ -e $PIDFILE ] && kill -0 `cat $PIDFILE`) then
start-stop-daemon --stop --signal HUP --pidfile $PIDFILE
else
start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON
fi
log_end_msg $?
;;
restart|force-reload)
log_daemon_msg "Restarting $DESC" "$NAME"
start-stop-daemon --stop --quiet --retry TERM/2/TERM/10/KILL/2 --pidfile $PIDFILE
sleep 2
start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON
log_end_msg $?
;;
*)
N=/etc/init.d/$NAME
echo "Usage: $N {start|stop|restart|force-reload}"
exit 1
;;
esac
exit 0
#!/bin/sh
### BEGIN INIT INFO
# Provides: pvenetcommit
# Required-Start: checkroot
# Required-Stop:
# Default-Start: S
# Default-Stop:
# Short-Description: commits network changes
### END INIT INFO
set -e
. /lib/lsb/init-functions
PATH=/sbin:/bin
IFFN=/etc/network/interfaces
# we cant use perl here, because this skript runs before
# we have /usr mounted
case "$1" in
start)
if test -f "${IFFN}.new"; then
echo "committing new network configuration";
if ! mv "${IFFN}.new" $IFFN; then
echo "unable to commit changes to '${IFFN}' - $!\n";
fi
fi
;;
stop|restart|force-reload)
exit 0
;;
*)
echo "Usage: /etc/init.d/pvenetcommit {start}"
exit 0
;;
esac
exit 0
#!/bin/sh
### BEGIN INIT INFO
# Provides: pvestatd
# Required-Start: $remote_fs $network $syslog pve-cluster pvedaemon
# Required-Stop: $remote_fs $network $syslog pve-cluster pvedaemon
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: PVE Status Daemon
### END INIT INFO
. /lib/lsb/init-functions
PATH=/sbin:/bin:/usr/bin:/usr/sbin
NAME=pvestatd
DAEMON=/usr/bin/pvestatd
DESC="PVE Status Daemon"
PIDFILE=/var/run/pvestatd.pid
test -f $DAEMON || exit 0
case "$1" in
start)
log_daemon_msg "Starting $DESC" "$NAME"
start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON
log_end_msg $?
;;
stop)
log_daemon_msg "Stopping $DESC" "$NAME"
start-stop-daemon --stop --quiet --retry TERM/5/TERM/10/KILL/2 --pidfile $PIDFILE
log_end_msg $?
;;
reload)
log_daemon_msg "Reloading $DESC" "$NAME"
if ( [ -e $PIDFILE ] && kill -0 `cat $PIDFILE`) then
start-stop-daemon --stop --quiet --pidfile $PIDFILE --signal HUP
else
start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON
fi
log_end_msg $?
;;
restart|force-reload)
log_daemon_msg "Restarting $DESC" "$NAME"
start-stop-daemon --stop --quiet --retry TERM/5/TERM/10/KILL/2 --pidfile $PIDFILE
start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON
log_end_msg $?
;;
*)
N=/etc/init.d/$NAME
echo "Usage: $N {start|stop|reload|restart|force-reload}" >&2
exit 1
;;
esac
exit 0
#!/usr/bin/perl -w
use strict;
use PVE::APLInfo;
use PVE::Config;
if (scalar (@ARGV) != 1) {
print STDERR "usage: $0 CMD\n";
exit (-1);
}
my $cmd = shift;
if ($cmd eq 'update') {
my $pvecfg = PVE::Config::read_file('pvecfg');
exit (0) if PVE::APLInfo::update($pvecfg->{http_proxy});
print STDERR "update failed - see /var/log/pveam.log for details\n";
exit (-1);
} else {
print STDERR "unknown CMD '$cmd'\n";
exit (-1);
}
#!/usr/bin/perl
use strict;
use PVE::INotify;
use PVE::Cluster;
my $nodename = PVE::INotify::nodename();
my $localip = PVE::Cluster::remote_node_ip($nodename, 1);
exit (0) if !$localip;
my $xline = '-' x 80;
print <<__EOBANNER;
$xline
Welcome to the Proxmox Virtual Environment. Please use your web browser to
configure this server - connect to:
https://${localip}:8006/
$xline
__EOBANNER
exit (0);
This diff is collapsed.
#!/usr/bin/perl -T -w
$ENV{'PATH'} = '/sbin:/bin:/usr/sbin:/usr/bin';
delete @ENV{qw(IFS CDPATH ENV BASH_ENV)};
use strict;
use Getopt::Long;
use POSIX ":sys_wait_h";
use Socket;
use PVE::SafeSyslog;
# use PVE::Config; # fixme
use PVE::APIDaemon;
my $pidfile = "/var/run/pvedaemon.pid";
my $opt_debug;
initlog ('pvedaemon');
if (!GetOptions ('debug' => \$opt_debug)) {
die "usage: $0 [--debug]\n";
}
$SIG{'__WARN__'} = sub {
my $err = $@;
my $t = $_[0];
chomp $t;
syslog('warning', "WARNING: %s", $t);
$@ = $err;
};
$0 = "pvedaemon";
my $cpid;
my $daemon;
eval {
$daemon = PVE::APIDaemon->new(
LocalAddr => "127.0.0.1",
LocalPort => 85,
Listen => SOMAXCONN,
ReuseAddr => 1,
);
};
my $err = $@;
if ($err) {
syslog ('err' , "unable to start server: $err");
print STDERR $err;
exit (-1);
}
if ($opt_debug || !($cpid = fork ())) {
$SIG{PIPE} = 'IGNORE';
$SIG{INT} = 'IGNORE' if !$opt_debug;
$SIG{TERM} = $SIG{QUIT} = sub {
syslog ('info' , "server closing");
$SIG{INT} = 'DEFAULT';
unlink "$pidfile";
exit (0);
};
syslog ('info' , "starting server");
if (!$opt_debug) {
# redirect STDIN/STDOUT/SDTERR to /dev/null
open STDIN, '</dev/null' || die "can't read /dev/null [$!]";
open STDOUT, '>/dev/null' || die "can't write /dev/null [$!]";
open STDERR, '>&STDOUT' || die "can't open STDERR to STDOUT [$!]";
}
POSIX::setsid();
system ("echo > /var/lib/pve-manager/vmops"); # init vmops file
eval {
$daemon->start_server();
};
my $err = $@;
if ($err) {
syslog ('err' , "unexpected server error: $err");
print STDERR $err if $opt_debug;
exit (-1);
}
} else {
open (PIDFILE, ">$pidfile") ||
die "cant write '$pidfile' - $! :ERROR";
print PIDFILE "$cpid\n";
close (PIDFILE) ||
die "cant write '$pidfile' - $! :ERROR";
}
exit (0);
__END__
=head1 NAME
pvedaemon - the PVE configuration server
=head1 SYNOPSIS
pvedaemon [--debug]
=head1 DESCRIPTION
All configuration is done using this Server. The Server only
listens to a local address 127.0.0.1 port 85 for security
reasons.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
#!/usr/bin/perl -w
use strict;
use Getopt::Long;
use PVE::pvecfg;
sub read_pkglist {
my $pkglist = {};
open (TMP, "dpkg-query --show -f '\${PACKAGE} \${VERSION} \${STATUS}\n'|") ||
die "cant exec dpkg-query\n";
while (defined (my $line = <TMP>)) {
if ($line =~ m/^(\S+)\s+(\S+)\s+install\s+ok\s+installed$/) {
my ($pkg, $version) = ($1, $2);
$pkglist->{$pkg} = $version;
}
}
return $pkglist;
}
my $pkglist = read_pkglist();
sub print_status {
my ($pkg, $repoid) = @_;
my $version = "not correctly installed";
if ($pkglist->{$pkg}) {
$version = $pkglist->{$pkg};
}
if ($repoid) {
print "$pkg: $version ($repoid)\n";
} else {
print "$pkg: $version\n";
}
}
sub print_usage {
my $msg = shift;
print STDERR "ERROR: $msg\n" if $msg;
print STDERR "USAGE: pveversion [--verbose]\n";
}
my $opt_verbose;
if (!GetOptions ('verbose' => \$opt_verbose)) {
print_usage ();
exit (-1);
}
if (scalar (@ARGV) != 0) {
print_usage ();
exit (-1);
}
my $ver = PVE::pvecfg::package();
$ver .= '/';
$ver .= PVE::pvecfg::version();
$ver .= '/';
$ver .= PVE::pvecfg::repoid();
my $kver = `uname -r`;
chomp $kver;
if (!$opt_verbose) {
print "$ver\n";
exit (0);
}
print_status ("pve-manager", $ver);
print "running kernel: $kver\n";
my @list = qw(corosync-pve openais-pve libqb redhat-cluster-pve pve-cluster qemu-server pve-firmware libpve-common-perl libpve-access-control libpve-storage-perl vncterm vzctl vzdump vzprocps vzquota);
my $pkg = 'proxmox-ve-2.6.18';
if (my $v = $pkglist->{$pkg}) {
print "$pkg: $v\n";
push @list, 'pve-qemu-kvm-2.6.18';
}
$pkg = 'proxmox-ve-2.6.24';
if (my $v = $pkglist->{$pkg}) {
print "$pkg: $v\n";
push @list, 'pve-qemu-kvm';
}
$pkg = 'proxmox-ve-2.6.32';
if (my $v = $pkglist->{$pkg}) {
print "$pkg: $v\n";
push @list, 'pve-qemu-kvm';
push @list, 'ksm-control-daemon';
}
foreach $pkg (grep { m/^pve-kernel-/ } keys %$pkglist) {
print "$pkg: $pkglist->{$pkg}\n";
}
foreach my $p (@list) {
print_status ($p);
}
exit 0;
__END__
=head1 NAME
pveversion - Proxmox VE version info
=head1 SYNOPSIS
pveversion [--verbose]
=head1 DESCRIPTION
Print version information for Proxmox VE packages.
include $(top_builddir)/common.mk
exampledir = ${DOCDIR}/examples
example_SCRIPTS = \
example1.pl \
example2.pl
CLEANFILES = *~
This diff is collapsed.
#!/usr/bin/perl -w
use strict;
use PVE::API2Client;
use PVE::AccessControl;
use PVE::INotify;
use Data::Dumper;
my $hostname = PVE::INotify::read_file("hostname");
# normally you use username/password,
# but we can simply create a ticket if we are root
my $ticket = PVE::AccessControl::assemble_ticket('root');
my $conn = PVE::API2Client->new(
# username => 'root',
# password => 'yourpassword',
ticket => $ticket,
host => $hostname,
);
my $res = $conn->get("api2/json/", {});
print "TEST: " . Dumper($res);
#!/usr/bin/perl -w
use strict;
use PVE::API2Client;
use PVE::AccessControl;
use PVE::INotify;
use Data::Dumper;
my $hostname = PVE::INotify::read_file("hostname");
# normally you use username/password,
# but we can simply create a ticket if we are root
my $ticket = PVE::AccessControl::assemble_ticket('root');
my $conn = PVE::API2Client->new(
#username => 'root',
#password => 'yourpassword',
ticket => $ticket,
host => $hostname,
);
my $res = $conn->get("api2/json/access/domains", {});
print "TEST: " . Dumper($res);
#!/usr/bin/perl -w
use strict;
use Time::HiRes qw( usleep ualarm gettimeofday tv_interval );
use PVE::API2Client;
use PVE::INotify;
use Data::Dumper;
my $hostname = PVE::INotify::read_file("hostname");
# normally you use username/password,
# but we can simply create a ticket if we are root
my $ticket = PVE::AccessControl::assemble_ticket('root');
my $wcount = 4;
my $qcount = 500;
sub test_rpc {
my ($host) = @_;
my $conn = PVE::API2Client->new(
#username => 'root',
#password => 'yourpassword',
ticket => $ticket,
host => $host,
);
for (my $i = 0; $i < $qcount; $i++) {
eval {
my $res = $conn->get("api2/json", {});
};
my $err = $@;
if ($err) {
print "ERROR: $err\n";
last;
}
}
}
sub run_tests {
my ($host) = @_;
my $workers;
my $starttime = [gettimeofday];
for (my $i = 0; $i < $wcount; $i++) {
if (my $pid = fork ()) {
$workers->{$pid} = 1;
} else {
test_rpc ($host);
exit (0);
}
}
# wait for children
1 while (wait > 0);
my $elapsed = int(tv_interval ($starttime) * 1000);
my $tpq = $elapsed / ($wcount*$qcount);
print "$host: $tpq ms per query\n";
}
# TODO: Apache is much slower, why?
run_tests("localhost"); # test 'pvedaemon'
run_tests($hostname); # test 'apache'
RELEASE=2.0
man1dir = "/usr/share/man/man1"
man7dir = "/usr/share/man/man7"
%.1: %
pod2man -n $* -s 1 -r "proxmox 1.0" -c "Proxmox Documentation" <$* >$*.1
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Copyright (C) 2010 Proxmox Server Solutions GmbH
This software is written by Proxmox Server Solutions GmbH <support@proxmox.com>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
This diff is collapsed.
This diff is collapsed.
/etc/init.d/pvedaemon
/etc/init.d/pvebanner
/etc/init.d/pvenetcommit
/etc/init.d/pvestatd
/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
#!/bin/sh
# Abort if any command returns an error value
set -e
. /usr/share/debconf/confmodule
# we do nothing here
exit 0
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
interest /usr/share/perl5
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment