mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-10-04 02:06:02 +00:00
removed automake/autoconf, removed unused files
This commit is contained in:
parent
aff192e6f5
commit
beb651ee65
90
Makefile
Normal file
90
Makefile
Normal file
@ -0,0 +1,90 @@
|
||||
include defines.mk
|
||||
|
||||
DESTDIR=
|
||||
|
||||
#SUBDIRS = bin lib www aplinfo
|
||||
SUBDIRS = aplinfo PVE bin www
|
||||
|
||||
DEB=${PACKAGE}_${VERSION}-${PACKAGERELEASE}_all.deb
|
||||
|
||||
all: ${SUBDIRS}
|
||||
|
||||
%:
|
||||
set -e && for i in ${SUBDIRS}; do ${MAKE} -C $$i $@; done
|
||||
|
||||
|
||||
.PHONY: dinstall
|
||||
dinstall: ${DEB}
|
||||
dpkg -i ${DEB}
|
||||
|
||||
country.dat: country.pl
|
||||
./country.pl > country.dat
|
||||
|
||||
.PHONY: ${DEB}
|
||||
${DEB} deb:
|
||||
make clean
|
||||
rm -rf dest
|
||||
mkdir dest
|
||||
make DESTDIR=`pwd`/dest install
|
||||
mkdir dest/DEBIAN
|
||||
sed -e s/@VERSION@/${VERSION}/ -e s/@PACKAGE@/${PACKAGE}/ -e s/@PACKAGERELEASE@/${PACKAGERELEASE}/ debian/control.in >dest/DEBIAN/control
|
||||
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/
|
||||
|
||||
.PHONY: install
|
||||
install: country.dat vznet.conf
|
||||
install -d ${DESTDIR}/usr/share/${PACKAGE}
|
||||
install -d ${DESTDIR}/usr/share/man/man1
|
||||
install -d ${DESTDIR}/usr/share/doc/${PACKAGE}
|
||||
install -d ${DESTDIR}/var/lib/${PACKAGE}
|
||||
install -d ${DESTDIR}/var/lib/vz/images
|
||||
install -d ${DESTDIR}/var/lib/vz/template/cache
|
||||
install -d ${DESTDIR}/var/lib/vz/template/iso
|
||||
install -d ${DESTDIR}/var/lib/vz/template/qemu
|
||||
install -D -m 0755 vznet.conf ${DESTDIR}/etc/vz/vznet.conf
|
||||
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}
|
||||
set -e && for i in ${SUBDIRS}; do ${MAKE} -C $$i $@; done
|
||||
|
||||
.PHONY: distclean
|
||||
distclean: clean
|
||||
set -e && for i in ${SUBDIRS}; do ${MAKE} -C $$i $@; done
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
set -e && for i in ${SUBDIRS}; do ${MAKE} -C $$i $@; done
|
||||
find . -name '*~' -exec rm {} ';'
|
||||
rm -rf dest country.dat *.deb
|
92
Makefile.am
92
Makefile.am
@ -1,92 +0,0 @@
|
||||
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
|
22
PVE/API2/Makefile
Normal file
22
PVE/API2/Makefile
Normal file
@ -0,0 +1,22 @@
|
||||
include ../../defines.mk
|
||||
|
||||
PERLSOURCE = \
|
||||
Cluster.pm \
|
||||
Nodes.pm \
|
||||
Tasks.pm \
|
||||
Network.pm \
|
||||
Services.pm
|
||||
|
||||
all:
|
||||
|
||||
.PHONY: distclean
|
||||
distclean: clean
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
rm -rf *~
|
||||
|
||||
.PHONY: install
|
||||
install: ${PERLSOURCE}
|
||||
install -d ${PERLLIBDIR}/PVE/API2
|
||||
install -m 0644 ${PERLSOURCE} ${PERLLIBDIR}/PVE/API2
|
34
PVE/Makefile
Normal file
34
PVE/Makefile
Normal file
@ -0,0 +1,34 @@
|
||||
include ../defines.mk
|
||||
|
||||
SUBDIRS=API2
|
||||
|
||||
PERLSOURCE = \
|
||||
API2.pm \
|
||||
API2Client.pm \
|
||||
APIDaemon.pm \
|
||||
REST.pm \
|
||||
APLInfo.pm
|
||||
|
||||
all: pvecfg.pm ${SUBDIRS}
|
||||
|
||||
pvecfg.pm: pvecfg.pm.in
|
||||
sed -e s/@VERSION@/${VERSION}/ -e s/@PACKAGE@/${PACKAGE}/ $< >$@
|
||||
|
||||
%:
|
||||
set -e && for i in ${SUBDIRS}; do ${MAKE} -C $$i $@; done
|
||||
|
||||
.PHONY: distclean
|
||||
distclean: clean
|
||||
set -e && for i in ${SUBDIRS}; do ${MAKE} -C $$i $@; done
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
set -e && for i in ${SUBDIRS}; do ${MAKE} -C $$i $@; done
|
||||
rm -rf *~ pvecfg.pm
|
||||
|
||||
.PHONY: install
|
||||
install: pvecfg.pm ${PERLSOURCE}
|
||||
install -d ${PERLLIBDIR}/PVE
|
||||
install -m 0644 pvecfg.pm ${PERLLIBDIR}/PVE/
|
||||
install -m 0644 ${PERLSOURCE} ${PERLLIBDIR}/PVE/
|
||||
set -e && for i in ${SUBDIRS}; do ${MAKE} -C $$i $@; done
|
1567
aclocal.m4
vendored
1567
aclocal.m4
vendored
File diff suppressed because it is too large
Load Diff
16
aplinfo/Makefile
Normal file
16
aplinfo/Makefile
Normal file
@ -0,0 +1,16 @@
|
||||
|
||||
DOCDIR=/usr/share/doc/pve-manager/
|
||||
|
||||
all:
|
||||
|
||||
.PHONY: install
|
||||
install: aplinfo.dat support@proxmox.com.pubkey
|
||||
install -D -m 0644 aplinfo.dat ${DESTDIR}${DOCDIR}/aplinfo.dat
|
||||
install -D -m 0644 support@proxmox.com.pubkey ${DESTDIR}${DOCDIR}/support@proxmox.com.pubkey
|
||||
|
||||
.PHONY: distclean
|
||||
distclean: clean
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
rm -rf *~ aplinfo.dat.gz aplinfo.dat.asc
|
@ -1,7 +0,0 @@
|
||||
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
|
19
autogen.sh
19
autogen.sh
@ -1,19 +0,0 @@
|
||||
#!/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
|
40
bin/Makefile
Normal file
40
bin/Makefile
Normal file
@ -0,0 +1,40 @@
|
||||
include ../defines.mk
|
||||
|
||||
SUBDIRS = init.d cron test
|
||||
|
||||
SCRIPTS = \
|
||||
pvestatd \
|
||||
pvesh \
|
||||
pveam \
|
||||
pvebanner \
|
||||
pvectl \
|
||||
pvedaemon \
|
||||
pveversion \
|
||||
pveperf
|
||||
|
||||
MANS = \
|
||||
pvestatd.1 \
|
||||
pvedaemon.1 \
|
||||
pveversion.1 \
|
||||
pveperf.1
|
||||
|
||||
%.1: %
|
||||
pod2man -n $* -s 1 -r "proxmox ${VERSION}" -c "Proxmox Documentation" <$* >$*.1
|
||||
|
||||
.PHONY: install
|
||||
install: ${SCRIPTS} ${MANS}
|
||||
perl -I.. ./pvesh verifyapi
|
||||
install -d ${BINDIR}
|
||||
install -m 0755 ${SCRIPTS} ${BINDIR}
|
||||
install -d ${MAN1DIR}
|
||||
install -m 0644 ${MANS} ${MAN1DIR}
|
||||
set -e && for i in ${SUBDIRS}; do ${MAKE} -C $$i $@; done
|
||||
|
||||
.PHONY: distclean
|
||||
distclean: clean
|
||||
set -e && for i in ${SUBDIRS}; do ${MAKE} -C $$i $@; done
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
rm -rf *~ ${MANS}
|
||||
set -e && for i in ${SUBDIRS}; do ${MAKE} -C $$i $@; done
|
@ -1,26 +0,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
|
675
bin/Makefile.in
675
bin/Makefile.in
@ -1,675 +0,0 @@
|
||||
# Makefile.in generated by automake 1.11.1 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
|
||||
# Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
VPATH = @srcdir@
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkglibexecdir = $(libexecdir)/@PACKAGE@
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
subdir = bin
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/configure.in
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_CLEAN_FILES =
|
||||
CONFIG_CLEAN_VPATH_FILES =
|
||||
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
|
||||
am__vpath_adj = case $$p in \
|
||||
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
*) f=$$p;; \
|
||||
esac;
|
||||
am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
|
||||
am__install_max = 40
|
||||
am__nobase_strip_setup = \
|
||||
srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
|
||||
am__nobase_strip = \
|
||||
for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
|
||||
am__nobase_list = $(am__nobase_strip_setup); \
|
||||
for p in $$list; do echo "$$p $$p"; done | \
|
||||
sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
|
||||
$(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
|
||||
if (++n[$$2] == $(am__install_max)) \
|
||||
{ print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
|
||||
END { for (dir in files) print dir, files[dir] }'
|
||||
am__base_list = \
|
||||
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
|
||||
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
|
||||
am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)"
|
||||
SCRIPTS = $(bin_SCRIPTS)
|
||||
SOURCES =
|
||||
DIST_SOURCES =
|
||||
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
|
||||
html-recursive info-recursive install-data-recursive \
|
||||
install-dvi-recursive install-exec-recursive \
|
||||
install-html-recursive install-info-recursive \
|
||||
install-pdf-recursive install-ps-recursive install-recursive \
|
||||
installcheck-recursive installdirs-recursive pdf-recursive \
|
||||
ps-recursive uninstall-recursive
|
||||
man1dir = $(mandir)/man1
|
||||
NROFF = nroff
|
||||
MANS = $(man_MANS)
|
||||
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
|
||||
distclean-recursive maintainer-clean-recursive
|
||||
AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
|
||||
$(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
|
||||
distdir
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
DIST_SUBDIRS = $(SUBDIRS)
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
am__relativize = \
|
||||
dir0=`pwd`; \
|
||||
sed_first='s,^\([^/]*\)/.*$$,\1,'; \
|
||||
sed_rest='s,^[^/]*/*,,'; \
|
||||
sed_last='s,^.*/\([^/]*\)$$,\1,'; \
|
||||
sed_butlast='s,/*[^/]*$$,,'; \
|
||||
while test -n "$$dir1"; do \
|
||||
first=`echo "$$dir1" | sed -e "$$sed_first"`; \
|
||||
if test "$$first" != "."; then \
|
||||
if test "$$first" = ".."; then \
|
||||
dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
|
||||
dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
|
||||
else \
|
||||
first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
|
||||
if test "$$first2" = "$$first"; then \
|
||||
dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
|
||||
else \
|
||||
dir2="../$$dir2"; \
|
||||
fi; \
|
||||
dir0="$$dir0"/"$$first"; \
|
||||
fi; \
|
||||
fi; \
|
||||
dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
|
||||
done; \
|
||||
reldir="$$dir2"
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMTAR = @AMTAR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
DOCDIR = @DOCDIR@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EXEEXT = @EXEEXT@
|
||||
GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
|
||||
GMSGFMT = @GMSGFMT@
|
||||
GMSGFMT_015 = @GMSGFMT_015@
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAINT = @MAINT@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MKDIR_P = @MKDIR_P@
|
||||
MSGFMT = @MSGFMT@
|
||||
MSGFMT_015 = @MSGFMT_015@
|
||||
MSGMERGE = @MSGMERGE@
|
||||
OBJEXT = @OBJEXT@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGERELEASE = @PACKAGERELEASE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_URL = @PACKAGE_URL@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
PERL_LIBDIR = @PERL_LIBDIR@
|
||||
PROXMOX_ETC = @PROXMOX_ETC@
|
||||
REPOID = @REPOID@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
USE_NLS = @USE_NLS@
|
||||
VERSION = @VERSION@
|
||||
WWW_BASEDIR = @WWW_BASEDIR@
|
||||
WWW_CSSDIR = @WWW_CSSDIR@
|
||||
WWW_EXTDIR = @WWW_EXTDIR@
|
||||
WWW_IMAGEDIR = @WWW_IMAGEDIR@
|
||||
WWW_ROOTDIR = @WWW_ROOTDIR@
|
||||
XGETTEXT = @XGETTEXT@
|
||||
XGETTEXT_015 = @XGETTEXT_015@
|
||||
XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
|
||||
abs_builddir = @abs_builddir@
|
||||
abs_srcdir = @abs_srcdir@
|
||||
abs_top_builddir = @abs_top_builddir@
|
||||
abs_top_srcdir = @abs_top_srcdir@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
bindir = /usr/bin
|
||||
build_alias = @build_alias@
|
||||
builddir = @builddir@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host_alias = @host_alias@
|
||||
htmldir = @htmldir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
pdfdir = @pdfdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
top_build_prefix = @top_build_prefix@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
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) *~
|
||||
all: all-recursive
|
||||
|
||||
.SUFFIXES:
|
||||
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
|
||||
&& { if test -f $@; then exit 0; else break; fi; }; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign bin/Makefile'; \
|
||||
$(am__cd) $(top_srcdir) && \
|
||||
$(AUTOMAKE) --foreign bin/Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(am__aclocal_m4_deps):
|
||||
install-binSCRIPTS: $(bin_SCRIPTS)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
|
||||
@list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \
|
||||
for p in $$list; do \
|
||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
|
||||
done | \
|
||||
sed -e 'p;s,.*/,,;n' \
|
||||
-e 'h;s|.*|.|' \
|
||||
-e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \
|
||||
$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \
|
||||
{ d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
|
||||
if ($$2 == $$4) { files[d] = files[d] " " $$1; \
|
||||
if (++n[d] == $(am__install_max)) { \
|
||||
print "f", d, files[d]; n[d] = 0; files[d] = "" } } \
|
||||
else { print "f", d "/" $$4, $$1 } } \
|
||||
END { for (d in files) print "f", d, files[d] }' | \
|
||||
while read type dir files; do \
|
||||
if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
|
||||
test -z "$$files" || { \
|
||||
echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \
|
||||
$(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
|
||||
} \
|
||||
; done
|
||||
|
||||
uninstall-binSCRIPTS:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \
|
||||
files=`for p in $$list; do echo "$$p"; done | \
|
||||
sed -e 's,.*/,,;$(transform)'`; \
|
||||
test -n "$$list" || exit 0; \
|
||||
echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
|
||||
cd "$(DESTDIR)$(bindir)" && rm -f $$files
|
||||
install-man1: $(man_MANS)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)"
|
||||
@list=''; test -n "$(man1dir)" || exit 0; \
|
||||
{ for i in $$list; do echo "$$i"; done; \
|
||||
l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
|
||||
sed -n '/\.1[a-z]*$$/p'; \
|
||||
} | while read p; do \
|
||||
if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
|
||||
echo "$$d$$p"; echo "$$p"; \
|
||||
done | \
|
||||
sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
|
||||
-e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
|
||||
sed 'N;N;s,\n, ,g' | { \
|
||||
list=; while read file base inst; do \
|
||||
if test "$$base" = "$$inst"; then list="$$list $$file"; else \
|
||||
echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \
|
||||
$(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \
|
||||
fi; \
|
||||
done; \
|
||||
for i in $$list; do echo "$$i"; done | $(am__base_list) | \
|
||||
while read files; do \
|
||||
test -z "$$files" || { \
|
||||
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \
|
||||
$(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \
|
||||
done; }
|
||||
|
||||
uninstall-man1:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list=''; test -n "$(man1dir)" || exit 0; \
|
||||
files=`{ for i in $$list; do echo "$$i"; done; \
|
||||
l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
|
||||
sed -n '/\.1[a-z]*$$/p'; \
|
||||
} | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
|
||||
-e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
|
||||
test -z "$$files" || { \
|
||||
echo " ( cd '$(DESTDIR)$(man1dir)' && rm -f" $$files ")"; \
|
||||
cd "$(DESTDIR)$(man1dir)" && rm -f $$files; }
|
||||
|
||||
# This directory's subdirectories are mostly independent; you can cd
|
||||
# into them and run `make' without going through this Makefile.
|
||||
# To change the values of `make' variables: instead of editing Makefiles,
|
||||
# (1) if the variable is set in `config.status', edit `config.status'
|
||||
# (which will cause the Makefiles to be regenerated when you run `make');
|
||||
# (2) otherwise, pass the desired values on the `make' command line.
|
||||
$(RECURSIVE_TARGETS):
|
||||
@fail= failcom='exit 1'; \
|
||||
for f in x $$MAKEFLAGS; do \
|
||||
case $$f in \
|
||||
*=* | --[!k]*);; \
|
||||
*k*) failcom='fail=yes';; \
|
||||
esac; \
|
||||
done; \
|
||||
dot_seen=no; \
|
||||
target=`echo $@ | sed s/-recursive//`; \
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
echo "Making $$target in $$subdir"; \
|
||||
if test "$$subdir" = "."; then \
|
||||
dot_seen=yes; \
|
||||
local_target="$$target-am"; \
|
||||
else \
|
||||
local_target="$$target"; \
|
||||
fi; \
|
||||
($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||||
|| eval $$failcom; \
|
||||
done; \
|
||||
if test "$$dot_seen" = "no"; then \
|
||||
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
|
||||
fi; test -z "$$fail"
|
||||
|
||||
$(RECURSIVE_CLEAN_TARGETS):
|
||||
@fail= failcom='exit 1'; \
|
||||
for f in x $$MAKEFLAGS; do \
|
||||
case $$f in \
|
||||
*=* | --[!k]*);; \
|
||||
*k*) failcom='fail=yes';; \
|
||||
esac; \
|
||||
done; \
|
||||
dot_seen=no; \
|
||||
case "$@" in \
|
||||
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
|
||||
*) list='$(SUBDIRS)' ;; \
|
||||
esac; \
|
||||
rev=''; for subdir in $$list; do \
|
||||
if test "$$subdir" = "."; then :; else \
|
||||
rev="$$subdir $$rev"; \
|
||||
fi; \
|
||||
done; \
|
||||
rev="$$rev ."; \
|
||||
target=`echo $@ | sed s/-recursive//`; \
|
||||
for subdir in $$rev; do \
|
||||
echo "Making $$target in $$subdir"; \
|
||||
if test "$$subdir" = "."; then \
|
||||
local_target="$$target-am"; \
|
||||
else \
|
||||
local_target="$$target"; \
|
||||
fi; \
|
||||
($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||||
|| eval $$failcom; \
|
||||
done && test -z "$$fail"
|
||||
tags-recursive:
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
|
||||
done
|
||||
ctags-recursive:
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
|
||||
done
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
mkid -fID $$unique
|
||||
tags: TAGS
|
||||
|
||||
TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
set x; \
|
||||
here=`pwd`; \
|
||||
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
|
||||
include_option=--etags-include; \
|
||||
empty_fix=.; \
|
||||
else \
|
||||
include_option=--include; \
|
||||
empty_fix=; \
|
||||
fi; \
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
test ! -f $$subdir/TAGS || \
|
||||
set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
|
||||
fi; \
|
||||
done; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
shift; \
|
||||
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
if test $$# -gt 0; then \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
"$$@" $$unique; \
|
||||
else \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$unique; \
|
||||
fi; \
|
||||
fi
|
||||
ctags: CTAGS
|
||||
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
test -z "$(CTAGS_ARGS)$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$unique
|
||||
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& $(am__cd) $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) "$$here"
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@list='$(MANS)'; if test -n "$$list"; then \
|
||||
list=`for p in $$list; do \
|
||||
if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
|
||||
if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \
|
||||
if test -n "$$list" && \
|
||||
grep 'ab help2man is required to generate this page' $$list >/dev/null; then \
|
||||
echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \
|
||||
grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \
|
||||
echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \
|
||||
echo " typically \`make maintainer-clean' will remove them" >&2; \
|
||||
exit 1; \
|
||||
else :; fi; \
|
||||
else :; fi
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
list='$(DISTFILES)'; \
|
||||
dist_files=`for file in $$list; do echo $$file; done | \
|
||||
sed -e "s|^$$srcdirstrip/||;t" \
|
||||
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
|
||||
case $$dist_files in \
|
||||
*/*) $(MKDIR_P) `echo "$$dist_files" | \
|
||||
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
|
||||
sort -u` ;; \
|
||||
esac; \
|
||||
for file in $$dist_files; do \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test -d "$(distdir)/$$file"; then \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
|
||||
else \
|
||||
test -f "$(distdir)/$$file" \
|
||||
|| cp -p $$d/$$file "$(distdir)/$$file" \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
test -d "$(distdir)/$$subdir" \
|
||||
|| $(MKDIR_P) "$(distdir)/$$subdir" \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
|
||||
$(am__relativize); \
|
||||
new_distdir=$$reldir; \
|
||||
dir1=$$subdir; dir2="$(top_distdir)"; \
|
||||
$(am__relativize); \
|
||||
new_top_distdir=$$reldir; \
|
||||
echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
|
||||
echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
|
||||
($(am__cd) $$subdir && \
|
||||
$(MAKE) $(AM_MAKEFLAGS) \
|
||||
top_distdir="$$new_top_distdir" \
|
||||
distdir="$$new_distdir" \
|
||||
am__remove_distdir=: \
|
||||
am__skip_length_check=: \
|
||||
am__skip_mode_fix=: \
|
||||
distdir) \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
check-am: all-am
|
||||
check: check-recursive
|
||||
all-am: Makefile $(SCRIPTS) $(MANS)
|
||||
installdirs: installdirs-recursive
|
||||
installdirs-am:
|
||||
for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)"; do \
|
||||
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
|
||||
done
|
||||
install: install-recursive
|
||||
install-exec: install-exec-recursive
|
||||
install-data: install-data-recursive
|
||||
uninstall: uninstall-recursive
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-recursive
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-recursive
|
||||
|
||||
clean-am: clean-generic mostlyclean-am
|
||||
|
||||
distclean: distclean-recursive
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-generic distclean-tags
|
||||
|
||||
dvi: dvi-recursive
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-recursive
|
||||
|
||||
html-am:
|
||||
|
||||
info: info-recursive
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am: install-man
|
||||
|
||||
install-dvi: install-dvi-recursive
|
||||
|
||||
install-dvi-am:
|
||||
|
||||
install-exec-am: install-binSCRIPTS
|
||||
@$(NORMAL_INSTALL)
|
||||
$(MAKE) $(AM_MAKEFLAGS) install-exec-hook
|
||||
install-html: install-html-recursive
|
||||
|
||||
install-html-am:
|
||||
|
||||
install-info: install-info-recursive
|
||||
|
||||
install-info-am:
|
||||
|
||||
install-man: install-man1
|
||||
|
||||
install-pdf: install-pdf-recursive
|
||||
|
||||
install-pdf-am:
|
||||
|
||||
install-ps: install-ps-recursive
|
||||
|
||||
install-ps-am:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-recursive
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-recursive
|
||||
|
||||
mostlyclean-am: mostlyclean-generic
|
||||
|
||||
pdf: pdf-recursive
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-recursive
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-binSCRIPTS uninstall-man
|
||||
|
||||
uninstall-man: uninstall-man1
|
||||
|
||||
.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
|
||||
install-am install-exec-am install-strip tags-recursive
|
||||
|
||||
.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
|
||||
all all-am check check-am clean clean-generic ctags \
|
||||
ctags-recursive distclean distclean-generic distclean-tags \
|
||||
distdir dvi dvi-am html html-am info info-am install \
|
||||
install-am install-binSCRIPTS install-data install-data-am \
|
||||
install-dvi install-dvi-am install-exec install-exec-am \
|
||||
install-exec-hook install-html install-html-am install-info \
|
||||
install-info-am install-man install-man1 install-pdf \
|
||||
install-pdf-am install-ps install-ps-am install-strip \
|
||||
installcheck installcheck-am installdirs installdirs-am \
|
||||
maintainer-clean maintainer-clean-generic mostlyclean \
|
||||
mostlyclean-generic pdf pdf-am ps ps-am tags tags-recursive \
|
||||
uninstall uninstall-am uninstall-binSCRIPTS uninstall-man \
|
||||
uninstall-man1
|
||||
|
||||
include $(top_builddir)/common.mk
|
||||
|
||||
install-exec-hook:
|
||||
perl -I$(top_builddir)/lib ./pvesh verifyapi
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
6
bin/cron/Makefile
Normal file
6
bin/cron/Makefile
Normal file
@ -0,0 +1,6 @@
|
||||
SUBDIRS = daily
|
||||
|
||||
all: ${SUBDIRS}
|
||||
|
||||
%:
|
||||
set -e && for i in ${SUBDIRS}; do ${MAKE} -C $$i $@; done
|
@ -1 +0,0 @@
|
||||
SUBDIRS = daily
|
15
bin/cron/daily/Makefile
Normal file
15
bin/cron/daily/Makefile
Normal file
@ -0,0 +1,15 @@
|
||||
include ../../../defines.mk
|
||||
|
||||
all:
|
||||
|
||||
.PHONY: install
|
||||
install: pve
|
||||
install -d ${CRONDAILYDIR}
|
||||
install -m 0755 pve ${CRONDAILYDIR}
|
||||
|
||||
.PHONY: distclean
|
||||
distclean: clean
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
rm -rf *~
|
@ -1,6 +0,0 @@
|
||||
include $(top_builddir)/common.mk
|
||||
|
||||
crondaily_SCRIPTS = pve
|
||||
crondailydir = /etc/cron.daily
|
||||
|
||||
CLEANFILES = *~
|
21
bin/init.d/Makefile
Normal file
21
bin/init.d/Makefile
Normal file
@ -0,0 +1,21 @@
|
||||
include ../../defines.mk
|
||||
|
||||
all:
|
||||
|
||||
SCRIPTS = \
|
||||
pvedaemon \
|
||||
pvebanner \
|
||||
pvestatd \
|
||||
pvenetcommit
|
||||
|
||||
.PHONY: install
|
||||
install: ${SCRIPTS}
|
||||
install -d ${INITDBINDIR}
|
||||
install -m 0755 ${SCRIPTS} ${INITDBINDIR}
|
||||
|
||||
.PHONY: distclean
|
||||
distclean: clean
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
rm -rf *~
|
@ -1,11 +0,0 @@
|
||||
include $(top_builddir)/common.mk
|
||||
|
||||
initdbin_SCRIPTS = \
|
||||
pvedaemon \
|
||||
pvebanner \
|
||||
pvestatd \
|
||||
pvenetcommit
|
||||
|
||||
initdbindir = /etc/init.d/
|
||||
|
||||
CLEANFILES=*~
|
@ -1,403 +0,0 @@
|
||||
# Makefile.in generated by automake 1.11.1 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
|
||||
# Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
VPATH = @srcdir@
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkglibexecdir = $(libexecdir)/@PACKAGE@
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
subdir = bin/init.d
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/configure.in
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_CLEAN_FILES =
|
||||
CONFIG_CLEAN_VPATH_FILES =
|
||||
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
|
||||
am__vpath_adj = case $$p in \
|
||||
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
*) f=$$p;; \
|
||||
esac;
|
||||
am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
|
||||
am__install_max = 40
|
||||
am__nobase_strip_setup = \
|
||||
srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
|
||||
am__nobase_strip = \
|
||||
for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
|
||||
am__nobase_list = $(am__nobase_strip_setup); \
|
||||
for p in $$list; do echo "$$p $$p"; done | \
|
||||
sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
|
||||
$(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
|
||||
if (++n[$$2] == $(am__install_max)) \
|
||||
{ print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
|
||||
END { for (dir in files) print dir, files[dir] }'
|
||||
am__base_list = \
|
||||
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
|
||||
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
|
||||
am__installdirs = "$(DESTDIR)$(initdbindir)"
|
||||
SCRIPTS = $(initdbin_SCRIPTS)
|
||||
SOURCES =
|
||||
DIST_SOURCES =
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMTAR = @AMTAR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
DOCDIR = @DOCDIR@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EXEEXT = @EXEEXT@
|
||||
GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
|
||||
GMSGFMT = @GMSGFMT@
|
||||
GMSGFMT_015 = @GMSGFMT_015@
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAINT = @MAINT@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MKDIR_P = @MKDIR_P@
|
||||
MSGFMT = @MSGFMT@
|
||||
MSGFMT_015 = @MSGFMT_015@
|
||||
MSGMERGE = @MSGMERGE@
|
||||
OBJEXT = @OBJEXT@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGERELEASE = @PACKAGERELEASE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_URL = @PACKAGE_URL@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
PERL_LIBDIR = @PERL_LIBDIR@
|
||||
PROXMOX_ETC = @PROXMOX_ETC@
|
||||
REPOID = @REPOID@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
USE_NLS = @USE_NLS@
|
||||
VERSION = @VERSION@
|
||||
WWW_BASEDIR = @WWW_BASEDIR@
|
||||
WWW_CSSDIR = @WWW_CSSDIR@
|
||||
WWW_EXTDIR = @WWW_EXTDIR@
|
||||
WWW_IMAGEDIR = @WWW_IMAGEDIR@
|
||||
WWW_ROOTDIR = @WWW_ROOTDIR@
|
||||
XGETTEXT = @XGETTEXT@
|
||||
XGETTEXT_015 = @XGETTEXT_015@
|
||||
XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
|
||||
abs_builddir = @abs_builddir@
|
||||
abs_srcdir = @abs_srcdir@
|
||||
abs_top_builddir = @abs_top_builddir@
|
||||
abs_top_srcdir = @abs_top_srcdir@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
bindir = @bindir@
|
||||
build_alias = @build_alias@
|
||||
builddir = @builddir@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host_alias = @host_alias@
|
||||
htmldir = @htmldir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
pdfdir = @pdfdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
top_build_prefix = @top_build_prefix@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
initdbin_SCRIPTS = \
|
||||
pvedaemon \
|
||||
pvebanner \
|
||||
pvestatd \
|
||||
pvenetcommit
|
||||
|
||||
initdbindir = /etc/init.d/
|
||||
CLEANFILES = *~
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
|
||||
&& { if test -f $@; then exit 0; else break; fi; }; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign bin/init.d/Makefile'; \
|
||||
$(am__cd) $(top_srcdir) && \
|
||||
$(AUTOMAKE) --foreign bin/init.d/Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(am__aclocal_m4_deps):
|
||||
install-initdbinSCRIPTS: $(initdbin_SCRIPTS)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(initdbindir)" || $(MKDIR_P) "$(DESTDIR)$(initdbindir)"
|
||||
@list='$(initdbin_SCRIPTS)'; test -n "$(initdbindir)" || list=; \
|
||||
for p in $$list; do \
|
||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
|
||||
done | \
|
||||
sed -e 'p;s,.*/,,;n' \
|
||||
-e 'h;s|.*|.|' \
|
||||
-e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \
|
||||
$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \
|
||||
{ d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
|
||||
if ($$2 == $$4) { files[d] = files[d] " " $$1; \
|
||||
if (++n[d] == $(am__install_max)) { \
|
||||
print "f", d, files[d]; n[d] = 0; files[d] = "" } } \
|
||||
else { print "f", d "/" $$4, $$1 } } \
|
||||
END { for (d in files) print "f", d, files[d] }' | \
|
||||
while read type dir files; do \
|
||||
if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
|
||||
test -z "$$files" || { \
|
||||
echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(initdbindir)$$dir'"; \
|
||||
$(INSTALL_SCRIPT) $$files "$(DESTDIR)$(initdbindir)$$dir" || exit $$?; \
|
||||
} \
|
||||
; done
|
||||
|
||||
uninstall-initdbinSCRIPTS:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(initdbin_SCRIPTS)'; test -n "$(initdbindir)" || exit 0; \
|
||||
files=`for p in $$list; do echo "$$p"; done | \
|
||||
sed -e 's,.*/,,;$(transform)'`; \
|
||||
test -n "$$list" || exit 0; \
|
||||
echo " ( cd '$(DESTDIR)$(initdbindir)' && rm -f" $$files ")"; \
|
||||
cd "$(DESTDIR)$(initdbindir)" && rm -f $$files
|
||||
tags: TAGS
|
||||
TAGS:
|
||||
|
||||
ctags: CTAGS
|
||||
CTAGS:
|
||||
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
list='$(DISTFILES)'; \
|
||||
dist_files=`for file in $$list; do echo $$file; done | \
|
||||
sed -e "s|^$$srcdirstrip/||;t" \
|
||||
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
|
||||
case $$dist_files in \
|
||||
*/*) $(MKDIR_P) `echo "$$dist_files" | \
|
||||
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
|
||||
sort -u` ;; \
|
||||
esac; \
|
||||
for file in $$dist_files; do \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test -d "$(distdir)/$$file"; then \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
|
||||
else \
|
||||
test -f "$(distdir)/$$file" \
|
||||
|| cp -p $$d/$$file "$(distdir)/$$file" \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
all-am: Makefile $(SCRIPTS)
|
||||
installdirs:
|
||||
for dir in "$(DESTDIR)$(initdbindir)"; do \
|
||||
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
|
||||
done
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-generic mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-generic
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-am
|
||||
|
||||
html-am:
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am: install-initdbinSCRIPTS
|
||||
|
||||
install-dvi: install-dvi-am
|
||||
|
||||
install-dvi-am:
|
||||
|
||||
install-exec-am:
|
||||
|
||||
install-html: install-html-am
|
||||
|
||||
install-html-am:
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-info-am:
|
||||
|
||||
install-man:
|
||||
|
||||
install-pdf: install-pdf-am
|
||||
|
||||
install-pdf-am:
|
||||
|
||||
install-ps: install-ps-am
|
||||
|
||||
install-ps-am:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
mostlyclean-am: mostlyclean-generic
|
||||
|
||||
pdf: pdf-am
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-am
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-initdbinSCRIPTS
|
||||
|
||||
.MAKE: install-am install-strip
|
||||
|
||||
.PHONY: all all-am check check-am clean clean-generic distclean \
|
||||
distclean-generic distdir dvi dvi-am html html-am info info-am \
|
||||
install install-am install-data install-data-am install-dvi \
|
||||
install-dvi-am install-exec install-exec-am install-html \
|
||||
install-html-am install-info install-info-am \
|
||||
install-initdbinSCRIPTS install-man install-pdf install-pdf-am \
|
||||
install-ps install-ps-am install-strip installcheck \
|
||||
installcheck-am installdirs maintainer-clean \
|
||||
maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
|
||||
pdf-am ps ps-am uninstall uninstall-am \
|
||||
uninstall-initdbinSCRIPTS
|
||||
|
||||
include $(top_builddir)/common.mk
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
19
bin/test/Makefile
Normal file
19
bin/test/Makefile
Normal file
@ -0,0 +1,19 @@
|
||||
include ../../defines.mk
|
||||
|
||||
all:
|
||||
|
||||
SCRIPTS = \
|
||||
example1.pl \
|
||||
example2.pl
|
||||
|
||||
.PHONY: install
|
||||
install: ${SCRIPTS}
|
||||
install -d ${DOCDIR}/examples
|
||||
install -m 0755 ${SCRIPTS} ${DOCDIR}/examples
|
||||
|
||||
.PHONY: distclean
|
||||
distclean: clean
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
rm -rf *~
|
@ -1,10 +0,0 @@
|
||||
include $(top_builddir)/common.mk
|
||||
|
||||
exampledir = ${DOCDIR}/examples
|
||||
|
||||
example_SCRIPTS = \
|
||||
example1.pl \
|
||||
example2.pl
|
||||
|
||||
|
||||
CLEANFILES = *~
|
@ -1,401 +0,0 @@
|
||||
# Makefile.in generated by automake 1.11.1 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
|
||||
# Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
VPATH = @srcdir@
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkglibexecdir = $(libexecdir)/@PACKAGE@
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
subdir = bin/test
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/configure.in
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_CLEAN_FILES =
|
||||
CONFIG_CLEAN_VPATH_FILES =
|
||||
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
|
||||
am__vpath_adj = case $$p in \
|
||||
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
*) f=$$p;; \
|
||||
esac;
|
||||
am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
|
||||
am__install_max = 40
|
||||
am__nobase_strip_setup = \
|
||||
srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
|
||||
am__nobase_strip = \
|
||||
for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
|
||||
am__nobase_list = $(am__nobase_strip_setup); \
|
||||
for p in $$list; do echo "$$p $$p"; done | \
|
||||
sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
|
||||
$(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
|
||||
if (++n[$$2] == $(am__install_max)) \
|
||||
{ print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
|
||||
END { for (dir in files) print dir, files[dir] }'
|
||||
am__base_list = \
|
||||
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
|
||||
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
|
||||
am__installdirs = "$(DESTDIR)$(exampledir)"
|
||||
SCRIPTS = $(example_SCRIPTS)
|
||||
SOURCES =
|
||||
DIST_SOURCES =
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMTAR = @AMTAR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
DOCDIR = @DOCDIR@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EXEEXT = @EXEEXT@
|
||||
GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
|
||||
GMSGFMT = @GMSGFMT@
|
||||
GMSGFMT_015 = @GMSGFMT_015@
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAINT = @MAINT@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MKDIR_P = @MKDIR_P@
|
||||
MSGFMT = @MSGFMT@
|
||||
MSGFMT_015 = @MSGFMT_015@
|
||||
MSGMERGE = @MSGMERGE@
|
||||
OBJEXT = @OBJEXT@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGERELEASE = @PACKAGERELEASE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_URL = @PACKAGE_URL@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
PERL_LIBDIR = @PERL_LIBDIR@
|
||||
PROXMOX_ETC = @PROXMOX_ETC@
|
||||
REPOID = @REPOID@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
USE_NLS = @USE_NLS@
|
||||
VERSION = @VERSION@
|
||||
WWW_BASEDIR = @WWW_BASEDIR@
|
||||
WWW_CSSDIR = @WWW_CSSDIR@
|
||||
WWW_EXTDIR = @WWW_EXTDIR@
|
||||
WWW_IMAGEDIR = @WWW_IMAGEDIR@
|
||||
WWW_ROOTDIR = @WWW_ROOTDIR@
|
||||
XGETTEXT = @XGETTEXT@
|
||||
XGETTEXT_015 = @XGETTEXT_015@
|
||||
XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
|
||||
abs_builddir = @abs_builddir@
|
||||
abs_srcdir = @abs_srcdir@
|
||||
abs_top_builddir = @abs_top_builddir@
|
||||
abs_top_srcdir = @abs_top_srcdir@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
bindir = @bindir@
|
||||
build_alias = @build_alias@
|
||||
builddir = @builddir@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host_alias = @host_alias@
|
||||
htmldir = @htmldir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
pdfdir = @pdfdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
top_build_prefix = @top_build_prefix@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
exampledir = ${DOCDIR}/examples
|
||||
example_SCRIPTS = \
|
||||
example1.pl \
|
||||
example2.pl
|
||||
|
||||
CLEANFILES = *~
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
|
||||
&& { if test -f $@; then exit 0; else break; fi; }; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign bin/test/Makefile'; \
|
||||
$(am__cd) $(top_srcdir) && \
|
||||
$(AUTOMAKE) --foreign bin/test/Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(am__aclocal_m4_deps):
|
||||
install-exampleSCRIPTS: $(example_SCRIPTS)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(exampledir)" || $(MKDIR_P) "$(DESTDIR)$(exampledir)"
|
||||
@list='$(example_SCRIPTS)'; test -n "$(exampledir)" || list=; \
|
||||
for p in $$list; do \
|
||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
|
||||
done | \
|
||||
sed -e 'p;s,.*/,,;n' \
|
||||
-e 'h;s|.*|.|' \
|
||||
-e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \
|
||||
$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \
|
||||
{ d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
|
||||
if ($$2 == $$4) { files[d] = files[d] " " $$1; \
|
||||
if (++n[d] == $(am__install_max)) { \
|
||||
print "f", d, files[d]; n[d] = 0; files[d] = "" } } \
|
||||
else { print "f", d "/" $$4, $$1 } } \
|
||||
END { for (d in files) print "f", d, files[d] }' | \
|
||||
while read type dir files; do \
|
||||
if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
|
||||
test -z "$$files" || { \
|
||||
echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(exampledir)$$dir'"; \
|
||||
$(INSTALL_SCRIPT) $$files "$(DESTDIR)$(exampledir)$$dir" || exit $$?; \
|
||||
} \
|
||||
; done
|
||||
|
||||
uninstall-exampleSCRIPTS:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(example_SCRIPTS)'; test -n "$(exampledir)" || exit 0; \
|
||||
files=`for p in $$list; do echo "$$p"; done | \
|
||||
sed -e 's,.*/,,;$(transform)'`; \
|
||||
test -n "$$list" || exit 0; \
|
||||
echo " ( cd '$(DESTDIR)$(exampledir)' && rm -f" $$files ")"; \
|
||||
cd "$(DESTDIR)$(exampledir)" && rm -f $$files
|
||||
tags: TAGS
|
||||
TAGS:
|
||||
|
||||
ctags: CTAGS
|
||||
CTAGS:
|
||||
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
list='$(DISTFILES)'; \
|
||||
dist_files=`for file in $$list; do echo $$file; done | \
|
||||
sed -e "s|^$$srcdirstrip/||;t" \
|
||||
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
|
||||
case $$dist_files in \
|
||||
*/*) $(MKDIR_P) `echo "$$dist_files" | \
|
||||
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
|
||||
sort -u` ;; \
|
||||
esac; \
|
||||
for file in $$dist_files; do \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test -d "$(distdir)/$$file"; then \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
|
||||
else \
|
||||
test -f "$(distdir)/$$file" \
|
||||
|| cp -p $$d/$$file "$(distdir)/$$file" \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
all-am: Makefile $(SCRIPTS)
|
||||
installdirs:
|
||||
for dir in "$(DESTDIR)$(exampledir)"; do \
|
||||
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
|
||||
done
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-generic mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-generic
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-am
|
||||
|
||||
html-am:
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am: install-exampleSCRIPTS
|
||||
|
||||
install-dvi: install-dvi-am
|
||||
|
||||
install-dvi-am:
|
||||
|
||||
install-exec-am:
|
||||
|
||||
install-html: install-html-am
|
||||
|
||||
install-html-am:
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-info-am:
|
||||
|
||||
install-man:
|
||||
|
||||
install-pdf: install-pdf-am
|
||||
|
||||
install-pdf-am:
|
||||
|
||||
install-ps: install-ps-am
|
||||
|
||||
install-ps-am:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
mostlyclean-am: mostlyclean-generic
|
||||
|
||||
pdf: pdf-am
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-am
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-exampleSCRIPTS
|
||||
|
||||
.MAKE: install-am install-strip
|
||||
|
||||
.PHONY: all all-am check check-am clean clean-generic distclean \
|
||||
distclean-generic distdir dvi dvi-am html html-am info info-am \
|
||||
install install-am install-data install-data-am install-dvi \
|
||||
install-dvi-am install-exampleSCRIPTS install-exec \
|
||||
install-exec-am install-html install-html-am install-info \
|
||||
install-info-am install-man install-pdf install-pdf-am \
|
||||
install-ps install-ps-am install-strip installcheck \
|
||||
installcheck-am installdirs maintainer-clean \
|
||||
maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
|
||||
pdf-am ps ps-am uninstall uninstall-am \
|
||||
uninstall-exampleSCRIPTS
|
||||
|
||||
include $(top_builddir)/common.mk
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
@ -1,8 +0,0 @@
|
||||
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
|
1502
config.guess
vendored
1502
config.guess
vendored
File diff suppressed because it is too large
Load Diff
1714
config.sub
vendored
1714
config.sub
vendored
File diff suppressed because it is too large
Load Diff
80
configure.in
80
configure.in
@ -1,80 +0,0 @@
|
||||
AC_INIT(README)
|
||||
AM_INIT_AUTOMAKE(pve-manager,2.0)
|
||||
AM_MAINTAINER_MODE
|
||||
|
||||
prefix=/usr
|
||||
|
||||
PACKAGERELEASE=4
|
||||
AC_SUBST(PACKAGERELEASE)
|
||||
|
||||
REPOID=`svnversion .`
|
||||
AC_SUBST(REPOID)
|
||||
|
||||
PERL_LIBDIR="/usr/share/perl5"
|
||||
AC_SUBST(PERL_LIBDIR)
|
||||
|
||||
PROXMOX_ETC="/etc/pve"
|
||||
AC_SUBST(PROXMOX_ETC)
|
||||
|
||||
DOCDIR="/usr/share/doc/${PACKAGE}"
|
||||
AC_SUBST(DOCDIR)
|
||||
|
||||
WWW_BASEDIR="/usr/share/${PACKAGE}"
|
||||
AC_SUBST(WWW_BASEDIR)
|
||||
|
||||
WWW_ROOTDIR="${WWW_BASEDIR}/root"
|
||||
AC_SUBST(WWW_ROOTDIR)
|
||||
|
||||
WWW_IMAGEDIR="${WWW_BASEDIR}/images"
|
||||
AC_SUBST(WWW_IMAGEDIR)
|
||||
|
||||
WWW_CSSDIR="${WWW_BASEDIR}/css"
|
||||
AC_SUBST(WWW_CSSDIR)
|
||||
|
||||
WWW_EXTDIR="${WWW_BASEDIR}/ext4"
|
||||
AC_SUBST(WWW_EXTDIR)
|
||||
|
||||
#AM_GNU_GETTEXT
|
||||
AM_PO_SUBDIRS
|
||||
|
||||
AC_PROG_CC()
|
||||
|
||||
AC_OUTPUT([
|
||||
Makefile
|
||||
po/Makefile.in
|
||||
debian/control
|
||||
aplinfo/Makefile
|
||||
lib/PVE/pvecfg.pm
|
||||
lib/Makefile
|
||||
lib/PVE/Makefile
|
||||
lib/PVE/API2/Makefile
|
||||
bin/Makefile
|
||||
bin/test/Makefile
|
||||
bin/init.d/Makefile
|
||||
bin/cron/Makefile
|
||||
bin/cron/daily/Makefile
|
||||
www/Makefile
|
||||
www/templates/Makefile
|
||||
www/css/Makefile
|
||||
www/ext4/Makefile
|
||||
www/manager/Makefile
|
||||
www/images/Makefile
|
||||
www/templates/pve.conf
|
||||
www/templates/pve-redirect.conf
|
||||
])
|
||||
|
||||
#www/root/Makefile
|
||||
#www/root/cluster/Makefile
|
||||
#www/root/vmlist/Makefile
|
||||
#www/root/openvz/Makefile
|
||||
#www/root/openvz/vmlogs/Makefile
|
||||
#www/root/qemu/Makefile
|
||||
#www/root/apl/Makefile
|
||||
#www/root/iso/Makefile
|
||||
#www/root/system/Makefile
|
||||
#www/root/server/Makefile
|
||||
#www/root/storage/Makefile
|
||||
#www/root/backup/Makefile
|
||||
#www/root/logs/Makefile
|
||||
|
||||
|
@ -1,6 +1,5 @@
|
||||
#!/usr/bin/perl -w
|
||||
|
||||
use lib qw (./lib);
|
||||
use strict;
|
||||
use PVE::Tools;
|
||||
|
||||
|
17
defines.mk
Normal file
17
defines.mk
Normal file
@ -0,0 +1,17 @@
|
||||
RELEASE=2.0
|
||||
|
||||
VERSION=2.0
|
||||
PACKAGE=pve-manager
|
||||
PKGREL=4
|
||||
|
||||
BINDIR=${DESTDIR}/usr/bin
|
||||
PERLLIBDIR=${DESTDIR}/usr/share/perl5
|
||||
MAN1DIR=${DESTDIR}/usr/share/man/man1
|
||||
CRONDAILYDIR=${DESTDIR}/etc/cron.daily
|
||||
INITDBINDIR=${DESTDIR}/etc/init.d/
|
||||
DOCDIR=${DESTDIR}/usr/share/doc/${PACKAGE}
|
||||
WWWBASEDIR=${DESTDIR}/usr/share/${PACKAGE}
|
||||
WWWROOTDIR=${WWWBASEDIR}/root
|
||||
WWWIMAGEDIR=${WWWBASEDIR}/images
|
||||
WWWEXT4DIR=${WWWBASEDIR}/ext4
|
||||
WWWCSSDIR=${WWWBASEDIR}/css
|
323
install-sh
323
install-sh
@ -1,323 +0,0 @@
|
||||
#!/bin/sh
|
||||
# install - install a program, script, or datafile
|
||||
|
||||
scriptversion=2005-05-14.22
|
||||
|
||||
# This originates from X11R5 (mit/util/scripts/install.sh), which was
|
||||
# later released in X11R6 (xc/config/util/install.sh) with the
|
||||
# following copyright and license.
|
||||
#
|
||||
# Copyright (C) 1994 X Consortium
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to
|
||||
# deal in the Software without restriction, including without limitation the
|
||||
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
# sell copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
||||
# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
|
||||
# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
#
|
||||
# Except as contained in this notice, the name of the X Consortium shall not
|
||||
# be used in advertising or otherwise to promote the sale, use or other deal-
|
||||
# ings in this Software without prior written authorization from the X Consor-
|
||||
# tium.
|
||||
#
|
||||
#
|
||||
# FSF changes to this file are in the public domain.
|
||||
#
|
||||
# Calling this script install-sh is preferred over install.sh, to prevent
|
||||
# `make' implicit rules from creating a file called install from it
|
||||
# when there is no Makefile.
|
||||
#
|
||||
# This script is compatible with the BSD install script, but was written
|
||||
# from scratch. It can only install one file at a time, a restriction
|
||||
# shared with many OS's install programs.
|
||||
|
||||
# set DOITPROG to echo to test this script
|
||||
|
||||
# Don't use :- since 4.3BSD and earlier shells don't like it.
|
||||
doit="${DOITPROG-}"
|
||||
|
||||
# put in absolute paths if you don't have them in your path; or use env. vars.
|
||||
|
||||
mvprog="${MVPROG-mv}"
|
||||
cpprog="${CPPROG-cp}"
|
||||
chmodprog="${CHMODPROG-chmod}"
|
||||
chownprog="${CHOWNPROG-chown}"
|
||||
chgrpprog="${CHGRPPROG-chgrp}"
|
||||
stripprog="${STRIPPROG-strip}"
|
||||
rmprog="${RMPROG-rm}"
|
||||
mkdirprog="${MKDIRPROG-mkdir}"
|
||||
|
||||
chmodcmd="$chmodprog 0755"
|
||||
chowncmd=
|
||||
chgrpcmd=
|
||||
stripcmd=
|
||||
rmcmd="$rmprog -f"
|
||||
mvcmd="$mvprog"
|
||||
src=
|
||||
dst=
|
||||
dir_arg=
|
||||
dstarg=
|
||||
no_target_directory=
|
||||
|
||||
usage="Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
|
||||
or: $0 [OPTION]... SRCFILES... DIRECTORY
|
||||
or: $0 [OPTION]... -t DIRECTORY SRCFILES...
|
||||
or: $0 [OPTION]... -d DIRECTORIES...
|
||||
|
||||
In the 1st form, copy SRCFILE to DSTFILE.
|
||||
In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
|
||||
In the 4th, create DIRECTORIES.
|
||||
|
||||
Options:
|
||||
-c (ignored)
|
||||
-d create directories instead of installing files.
|
||||
-g GROUP $chgrpprog installed files to GROUP.
|
||||
-m MODE $chmodprog installed files to MODE.
|
||||
-o USER $chownprog installed files to USER.
|
||||
-s $stripprog installed files.
|
||||
-t DIRECTORY install into DIRECTORY.
|
||||
-T report an error if DSTFILE is a directory.
|
||||
--help display this help and exit.
|
||||
--version display version info and exit.
|
||||
|
||||
Environment variables override the default commands:
|
||||
CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG
|
||||
"
|
||||
|
||||
while test -n "$1"; do
|
||||
case $1 in
|
||||
-c) shift
|
||||
continue;;
|
||||
|
||||
-d) dir_arg=true
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-g) chgrpcmd="$chgrpprog $2"
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
|
||||
--help) echo "$usage"; exit $?;;
|
||||
|
||||
-m) chmodcmd="$chmodprog $2"
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-o) chowncmd="$chownprog $2"
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-s) stripcmd=$stripprog
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-t) dstarg=$2
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-T) no_target_directory=true
|
||||
shift
|
||||
continue;;
|
||||
|
||||
--version) echo "$0 $scriptversion"; exit $?;;
|
||||
|
||||
*) # When -d is used, all remaining arguments are directories to create.
|
||||
# When -t is used, the destination is already specified.
|
||||
test -n "$dir_arg$dstarg" && break
|
||||
# Otherwise, the last argument is the destination. Remove it from $@.
|
||||
for arg
|
||||
do
|
||||
if test -n "$dstarg"; then
|
||||
# $@ is not empty: it contains at least $arg.
|
||||
set fnord "$@" "$dstarg"
|
||||
shift # fnord
|
||||
fi
|
||||
shift # arg
|
||||
dstarg=$arg
|
||||
done
|
||||
break;;
|
||||
esac
|
||||
done
|
||||
|
||||
if test -z "$1"; then
|
||||
if test -z "$dir_arg"; then
|
||||
echo "$0: no input file specified." >&2
|
||||
exit 1
|
||||
fi
|
||||
# It's OK to call `install-sh -d' without argument.
|
||||
# This can happen when creating conditional directories.
|
||||
exit 0
|
||||
fi
|
||||
|
||||
for src
|
||||
do
|
||||
# Protect names starting with `-'.
|
||||
case $src in
|
||||
-*) src=./$src ;;
|
||||
esac
|
||||
|
||||
if test -n "$dir_arg"; then
|
||||
dst=$src
|
||||
src=
|
||||
|
||||
if test -d "$dst"; then
|
||||
mkdircmd=:
|
||||
chmodcmd=
|
||||
else
|
||||
mkdircmd=$mkdirprog
|
||||
fi
|
||||
else
|
||||
# Waiting for this to be detected by the "$cpprog $src $dsttmp" command
|
||||
# might cause directories to be created, which would be especially bad
|
||||
# if $src (and thus $dsttmp) contains '*'.
|
||||
if test ! -f "$src" && test ! -d "$src"; then
|
||||
echo "$0: $src does not exist." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if test -z "$dstarg"; then
|
||||
echo "$0: no destination specified." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
dst=$dstarg
|
||||
# Protect names starting with `-'.
|
||||
case $dst in
|
||||
-*) dst=./$dst ;;
|
||||
esac
|
||||
|
||||
# If destination is a directory, append the input filename; won't work
|
||||
# if double slashes aren't ignored.
|
||||
if test -d "$dst"; then
|
||||
if test -n "$no_target_directory"; then
|
||||
echo "$0: $dstarg: Is a directory" >&2
|
||||
exit 1
|
||||
fi
|
||||
dst=$dst/`basename "$src"`
|
||||
fi
|
||||
fi
|
||||
|
||||
# This sed command emulates the dirname command.
|
||||
dstdir=`echo "$dst" | sed -e 's,/*$,,;s,[^/]*$,,;s,/*$,,;s,^$,.,'`
|
||||
|
||||
# Make sure that the destination directory exists.
|
||||
|
||||
# Skip lots of stat calls in the usual case.
|
||||
if test ! -d "$dstdir"; then
|
||||
defaultIFS='
|
||||
'
|
||||
IFS="${IFS-$defaultIFS}"
|
||||
|
||||
oIFS=$IFS
|
||||
# Some sh's can't handle IFS=/ for some reason.
|
||||
IFS='%'
|
||||
set x `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'`
|
||||
shift
|
||||
IFS=$oIFS
|
||||
|
||||
pathcomp=
|
||||
|
||||
while test $# -ne 0 ; do
|
||||
pathcomp=$pathcomp$1
|
||||
shift
|
||||
if test ! -d "$pathcomp"; then
|
||||
$mkdirprog "$pathcomp"
|
||||
# mkdir can fail with a `File exist' error in case several
|
||||
# install-sh are creating the directory concurrently. This
|
||||
# is OK.
|
||||
test -d "$pathcomp" || exit
|
||||
fi
|
||||
pathcomp=$pathcomp/
|
||||
done
|
||||
fi
|
||||
|
||||
if test -n "$dir_arg"; then
|
||||
$doit $mkdircmd "$dst" \
|
||||
&& { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \
|
||||
&& { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \
|
||||
&& { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \
|
||||
&& { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; }
|
||||
|
||||
else
|
||||
dstfile=`basename "$dst"`
|
||||
|
||||
# Make a couple of temp file names in the proper directory.
|
||||
dsttmp=$dstdir/_inst.$$_
|
||||
rmtmp=$dstdir/_rm.$$_
|
||||
|
||||
# Trap to clean up those temp files at exit.
|
||||
trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
|
||||
trap '(exit $?); exit' 1 2 13 15
|
||||
|
||||
# Copy the file name to the temp name.
|
||||
$doit $cpprog "$src" "$dsttmp" &&
|
||||
|
||||
# and set any options; do chmod last to preserve setuid bits.
|
||||
#
|
||||
# If any of these fail, we abort the whole thing. If we want to
|
||||
# ignore errors from any of these, just make sure not to ignore
|
||||
# errors from the above "$doit $cpprog $src $dsttmp" command.
|
||||
#
|
||||
{ test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \
|
||||
&& { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \
|
||||
&& { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \
|
||||
&& { test -z "$chmodcmd" || $doit $chmodcmd "$dsttmp"; } &&
|
||||
|
||||
# Now rename the file to the real destination.
|
||||
{ $doit $mvcmd -f "$dsttmp" "$dstdir/$dstfile" 2>/dev/null \
|
||||
|| {
|
||||
# The rename failed, perhaps because mv can't rename something else
|
||||
# to itself, or perhaps because mv is so ancient that it does not
|
||||
# support -f.
|
||||
|
||||
# Now remove or move aside any old file at destination location.
|
||||
# We try this two ways since rm can't unlink itself on some
|
||||
# systems and the destination file might be busy for other
|
||||
# reasons. In this case, the final cleanup might fail but the new
|
||||
# file should still install successfully.
|
||||
{
|
||||
if test -f "$dstdir/$dstfile"; then
|
||||
$doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \
|
||||
|| $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \
|
||||
|| {
|
||||
echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2
|
||||
(exit 1); exit 1
|
||||
}
|
||||
else
|
||||
:
|
||||
fi
|
||||
} &&
|
||||
|
||||
# Now rename the file to the real destination.
|
||||
$doit $mvcmd "$dsttmp" "$dstdir/$dstfile"
|
||||
}
|
||||
}
|
||||
fi || { (exit 1); exit 1; }
|
||||
done
|
||||
|
||||
# The final little trick to "correctly" pass the exit status to the exit trap.
|
||||
{
|
||||
(exit 0); exit 0
|
||||
}
|
||||
|
||||
# Local variables:
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-end: "$"
|
||||
# End:
|
@ -1,3 +0,0 @@
|
||||
include $(top_builddir)/common.mk
|
||||
|
||||
SUBDIRS = PVE
|
@ -1,634 +0,0 @@
|
||||
package PVE::Cluster;
|
||||
|
||||
use strict;
|
||||
use Socket;
|
||||
use IO::File;
|
||||
use PVE::Config;
|
||||
use PVE::Utils;
|
||||
use PVE::I18N;
|
||||
use PVE::SafeSyslog;
|
||||
use Time::HiRes qw (gettimeofday);
|
||||
|
||||
my $hostrsapubkey;
|
||||
my $rootrsapubkey;
|
||||
|
||||
# x509 certificate utils
|
||||
|
||||
my $basedir = "/etc/pve";
|
||||
my $pveca_key_fn = "$basedir/priv/pve-root-ca.key";
|
||||
my $pveca_srl_fn = "$basedir/priv/pve-root-ca.srl";
|
||||
my $pveca_cert_fn = "$basedir/pve-root-ca.pem";
|
||||
my $pvessl_key_fn = "$basedir/local/pve-ssl.key";
|
||||
my $pvessl_cert_fn = "$basedir/local/pve-ssl.pem";
|
||||
|
||||
sub gen_local_dirs {
|
||||
my ($nodename) = @_;
|
||||
|
||||
(-l "$basedir/local" ) || die "pve configuration filesystem not mounted\n";
|
||||
|
||||
my $dir = "$basedir/nodes/$nodename";
|
||||
if (! -d $dir) {
|
||||
mkdir($dir) || die "unable to create directory '$dir' - $!\n";
|
||||
}
|
||||
$dir = "$dir/priv";
|
||||
if (! -d $dir) {
|
||||
mkdir($dir) || die "unable to create directory '$dir' - $!\n";
|
||||
}
|
||||
}
|
||||
|
||||
sub gen_pveca_key {
|
||||
|
||||
return if -f $pveca_key_fn;
|
||||
|
||||
eval {
|
||||
PVE::Utils::run_command (['openssl', 'genrsa', '-out', $pveca_key_fn, '1024']);
|
||||
};
|
||||
|
||||
die "unable to generate pve ca key:\n$@" if $@;
|
||||
}
|
||||
|
||||
sub gen_pveca_cert {
|
||||
|
||||
if (-f $pveca_key_fn && -f $pveca_cert_fn) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
gen_pveca_key();
|
||||
|
||||
# we try to generate an unique 'subject' to avoid browser problems
|
||||
# (reused serial numbers, ..)
|
||||
my $nid = (split (/\s/, `md5sum '$pveca_key_fn'`))[0] || time();
|
||||
|
||||
eval {
|
||||
PVE::Utils::run_command (['openssl', 'req', '-batch', '-days', '3650', '-new',
|
||||
'-x509', '-nodes', '-key',
|
||||
$pveca_key_fn, '-out', $pveca_cert_fn, '-subj',
|
||||
"/CN=Proxmox Virtual Environment/OU=$nid/O=PVE Cluster Manager CA/"]);
|
||||
};
|
||||
|
||||
die "generating pve root certificate failed:\n$@" if $@;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
sub gen_pve_ssl_key {
|
||||
|
||||
return if -f $pvessl_key_fn;
|
||||
|
||||
eval {
|
||||
PVE::Utils::run_command (['openssl', 'genrsa', '-out', $pvessl_key_fn, '1024']);
|
||||
};
|
||||
|
||||
die "unable to generate pve ssl key:\n$@" if $@;
|
||||
}
|
||||
|
||||
sub update_serial {
|
||||
my ($serial) = @_;
|
||||
|
||||
PVE::Tools::file_set_contents($pveca_srl_fn, $serial);
|
||||
}
|
||||
|
||||
sub gen_pve_ssl_cert {
|
||||
my ($force, $nodename) = @_;
|
||||
|
||||
return if !$force && -f $pvessl_cert_fn;
|
||||
|
||||
my $names = "IP:127.0.0.1,DNS:localhost";
|
||||
|
||||
my $rc = PVE::Config::read_file ('resolvconf');
|
||||
|
||||
my $packed_ip = gethostbyname($nodename);
|
||||
if (defined $packed_ip) {
|
||||
my $ip = inet_ntoa($packed_ip);
|
||||
$names .= ",IP:" . $ip;
|
||||
}
|
||||
|
||||
my $fqdn = $nodename;
|
||||
|
||||
$names .= ",DNS:" . $nodename;
|
||||
|
||||
if ($rc && $rc->{search}) {
|
||||
$fqdn = $nodename . "." . $rc->{search};
|
||||
$names .= ",DNS:$fqdn";
|
||||
}
|
||||
|
||||
|
||||
my $sslconf = <<__EOD;
|
||||
RANDFILE = /root/.rnd
|
||||
extensions = v3_req
|
||||
|
||||
[ req ]
|
||||
default_bits = 1024
|
||||
distinguished_name = req_distinguished_name
|
||||
req_extensions = v3_req
|
||||
prompt = no
|
||||
string_mask = nombstr
|
||||
|
||||
[ req_distinguished_name ]
|
||||
organizationalUnitName = PVE Cluster Node
|
||||
organizationName = Proxmox Virtual Environment
|
||||
commonName = $fqdn
|
||||
|
||||
[ v3_req ]
|
||||
basicConstraints = CA:FALSE
|
||||
nsCertType = server
|
||||
keyUsage = nonRepudiation, digitalSignature, keyEncipherment
|
||||
subjectAltName = $names
|
||||
__EOD
|
||||
|
||||
my $cfgfn = "/tmp/pvesslconf-$$.tmp";
|
||||
my $fh = IO::File->new ($cfgfn, "w");
|
||||
print $fh $sslconf;
|
||||
close ($fh);
|
||||
|
||||
my $reqfn = "/tmp/pvecertreq-$$.tmp";
|
||||
unlink $reqfn;
|
||||
|
||||
eval {
|
||||
PVE::Utils::run_command (['openssl', 'req', '-batch', '-new', '-config', $cfgfn,
|
||||
'-key', $pvessl_key_fn, '-out', $reqfn]);
|
||||
};
|
||||
|
||||
if (my $err = $@) {
|
||||
unlink $reqfn;
|
||||
unlink $cfgfn;
|
||||
die "unable to generate pve certificate request:\n$err";
|
||||
}
|
||||
|
||||
update_serial ("0000000000000000") if ! -f $pveca_srl_fn;
|
||||
|
||||
eval {
|
||||
PVE::Utils::run_command (['openssl', 'x509', '-req', '-in', $reqfn, '-days', '3650',
|
||||
'-out', $pvessl_cert_fn, '-CAkey', $pveca_key_fn,
|
||||
'-CA', $pveca_cert_fn, '-CAserial', $pveca_srl_fn,
|
||||
'-extfile', $cfgfn]);
|
||||
};
|
||||
|
||||
if (my $err = $@) {
|
||||
unlink $reqfn;
|
||||
unlink $cfgfn;
|
||||
die "unable to generate pve ssl certificate:\n$err";
|
||||
}
|
||||
|
||||
unlink $cfgfn;
|
||||
unlink $reqfn;
|
||||
}
|
||||
|
||||
sub clusterinfo {
|
||||
my ($filename) = @_;
|
||||
|
||||
$filename = "/etc/pve/cluster.cfg" if !$filename;
|
||||
|
||||
my $ifaces = PVE::Config::read_file ("interfaces");
|
||||
my $hostname = PVE::Config::read_file ("hostname");
|
||||
my $ccfg = PVE::Config::read_file ($filename);
|
||||
|
||||
my $localip = $ifaces->{vmbr0}->{address} || $ifaces->{eth0}->{address};
|
||||
|
||||
my $cinfo;
|
||||
|
||||
if ($ccfg) {
|
||||
$cinfo = $ccfg;
|
||||
$cinfo->{exists} = 1;
|
||||
}
|
||||
|
||||
$cinfo->{local} = {
|
||||
role => '-',
|
||||
cid => 0,
|
||||
ip => $localip,
|
||||
name => $hostname,
|
||||
};
|
||||
|
||||
my $found = 0;
|
||||
foreach my $ni (@{$cinfo->{nodes}}) {
|
||||
if ($ni->{ip} eq $localip || $ni->{name} eq $hostname) {
|
||||
$cinfo->{local} = $ni;
|
||||
$found = 1;
|
||||
last;
|
||||
}
|
||||
}
|
||||
|
||||
if (!$found) {
|
||||
push @{$cinfo->{nodes}}, $cinfo->{local};
|
||||
$cinfo->{"CID_0"} = $cinfo->{local};
|
||||
}
|
||||
|
||||
# fixme: assign fixed ports instead?
|
||||
# fixme: $ni->{configport} = 50000 + $ni->{cid};
|
||||
my $ind = 0;
|
||||
foreach my $ni (sort {$a->{cid} <=> $b->{cid}} @{$cinfo->{nodes}}) {
|
||||
if ($ni->{cid} == $cinfo->{local}->{cid}) {
|
||||
$ni->{configport} = 83;
|
||||
} else {
|
||||
$ni->{configport} = 50000 + $ind;
|
||||
$ind++;
|
||||
}
|
||||
}
|
||||
|
||||
return $cinfo;
|
||||
}
|
||||
|
||||
sub save_clusterinfo {
|
||||
my ($cinfo) = @_;
|
||||
|
||||
my $filename = "/etc/pve/cluster.cfg";
|
||||
|
||||
my $fh = PVE::AtomicFile->open($filename, "w");
|
||||
|
||||
eval {
|
||||
|
||||
return if !$cinfo->{nodes} || scalar (@{$cinfo->{nodes}}) == 0;
|
||||
|
||||
printf ($fh "maxcid $cinfo->{maxcid}\n\n");
|
||||
|
||||
foreach my $ni (@{$cinfo->{nodes}}) {
|
||||
|
||||
my $cid = $ni->{cid};
|
||||
die "missing cluster id\n" if !$cid;
|
||||
die "missing ip address for node '$cid'\n" if !$ni->{ip};
|
||||
die "missing name for node '$cid'\n" if !$ni->{name};
|
||||
die "missing host RSA key for node '$cid'\n" if !$ni->{hostrsapubkey};
|
||||
die "missing user RSA key for node '$cid'\n" if !$ni->{rootrsapubkey};
|
||||
|
||||
if ($ni->{role} eq 'M') {
|
||||
printf ($fh "master $ni->{cid} {\n");
|
||||
printf ($fh " IP: $ni->{ip}\n");
|
||||
printf ($fh " NAME: $ni->{name}\n");
|
||||
printf ($fh " HOSTRSAPUBKEY: $ni->{hostrsapubkey}\n");
|
||||
printf ($fh " ROOTRSAPUBKEY: $ni->{rootrsapubkey}\n");
|
||||
printf ($fh "}\n\n");
|
||||
} elsif ($ni->{role} eq 'N') {
|
||||
printf ($fh "node $ni->{cid} {\n");
|
||||
printf ($fh " IP: $ni->{ip}\n");
|
||||
printf ($fh " NAME: $ni->{name}\n");
|
||||
printf ($fh " HOSTRSAPUBKEY: $ni->{hostrsapubkey}\n");
|
||||
printf ($fh " ROOTRSAPUBKEY: $ni->{rootrsapubkey}\n");
|
||||
printf ($fh "}\n\n");
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
my $err = $@;
|
||||
$fh->detach() if $err;
|
||||
$fh->close(1);
|
||||
|
||||
die $err if $err;
|
||||
}
|
||||
|
||||
sub rewrite_keys {
|
||||
my ($cinfo) = @_;
|
||||
|
||||
mkdir '/root/.ssh/';
|
||||
|
||||
# rewrite authorized hosts files
|
||||
|
||||
my $filename = '/root/.ssh/authorized_keys';
|
||||
my $fh;
|
||||
my $changes;
|
||||
|
||||
eval {
|
||||
|
||||
$fh = PVE::AtomicFile->open ($filename, "w");
|
||||
|
||||
my $done = {};
|
||||
|
||||
eval {
|
||||
if (open (ORG, "$filename")) {
|
||||
while (my $line = <ORG>) {
|
||||
if ($line =~ m/^\s*ssh-rsa\s+(\S+)\s+root\@(\S+)\s*$/) {
|
||||
my ($key, $ip) = ($1, $2);
|
||||
my $new;
|
||||
|
||||
foreach my $ni (@{$cinfo->{nodes}}) {
|
||||
$new = $ni if $ni->{ip} eq $ip;
|
||||
}
|
||||
|
||||
if ($new) {
|
||||
if (!$done->{$ip}) {
|
||||
$changes = 1 if $key ne $new->{rootrsapubkey};
|
||||
printf ($fh "ssh-rsa %s root\@%s\n", $new->{rootrsapubkey}, $new->{ip});
|
||||
$done->{$ip} = 1;
|
||||
}
|
||||
} else {
|
||||
print $fh $line; # copy line to new file
|
||||
}
|
||||
} else {
|
||||
print $fh $line; # copy line to new file
|
||||
}
|
||||
}
|
||||
close (ORG);
|
||||
}
|
||||
};
|
||||
|
||||
foreach my $ni (@{$cinfo->{nodes}}) {
|
||||
if (!$done->{$ni->{ip}}) {
|
||||
$changes = 1;
|
||||
printf ($fh "ssh-rsa %s root\@%s\n", $ni->{rootrsapubkey}, $ni->{ip});
|
||||
$done->{$ni->{ip}} = 1;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
$fh->close() if $fh;
|
||||
|
||||
chmod (0600, $filename);
|
||||
|
||||
# rewrite known hosts files
|
||||
|
||||
$filename = '/root/.ssh/known_hosts';
|
||||
|
||||
eval {
|
||||
|
||||
$fh = PVE::AtomicFile->open($filename, "w");
|
||||
|
||||
my $done = {};
|
||||
|
||||
eval {
|
||||
if (open (ORG, "$filename")) {
|
||||
while (my $line = <ORG>) {
|
||||
if ($line =~ m/^\s*(\S+)\s+ssh-rsa\s+(\S+)\s*$/) {
|
||||
my ($ip, $key) = ($1, $2);
|
||||
my $new;
|
||||
|
||||
foreach my $ni (@{$cinfo->{nodes}}) {
|
||||
$new = $ni if $ni->{ip} eq $ip;
|
||||
}
|
||||
|
||||
if ($new) {
|
||||
if (!$done->{$ip}) {
|
||||
$changes = 1 if $key ne $new->{hostrsapubkey};
|
||||
printf ($fh "%s ssh-rsa %s\n", $new->{ip}, $new->{hostrsapubkey});
|
||||
$done->{$ip} = 1;
|
||||
}
|
||||
} else {
|
||||
print $fh $line; # copy line to new file
|
||||
}
|
||||
} else {
|
||||
print $fh $line; # copy line to new file
|
||||
}
|
||||
}
|
||||
close (ORG);
|
||||
}
|
||||
};
|
||||
|
||||
foreach my $ni (@{$cinfo->{nodes}}) {
|
||||
if (!$done->{$ni->{ip}}) {
|
||||
$changes = 1;
|
||||
printf ($fh "%s ssh-rsa %s\n", $ni->{ip}, $ni->{hostrsapubkey});
|
||||
$done->{$ni->{ip}} = 1;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
$fh->close() if $fh;
|
||||
|
||||
return $changes;
|
||||
}
|
||||
|
||||
sub cluster_sync_mastercfg {
|
||||
my ($cinfo, $syncip, $noreload) = @_;
|
||||
|
||||
my $lip = $cinfo->{local}->{ip};
|
||||
my $lname = $cinfo->{local}->{name};
|
||||
|
||||
my $cmpccfg;
|
||||
my $cmppvecfg;
|
||||
my $cmpqemucfg;
|
||||
my $cmpvzdump;
|
||||
my $cmpstoragecfg;
|
||||
|
||||
my $storagecfg_old = PVE::Config::read_file ('storagecfg');
|
||||
|
||||
if ($syncip ne $lip) {
|
||||
|
||||
mkdir '/etc/pve/master';
|
||||
unlink </etc/pve/master/*>;
|
||||
|
||||
my $cmd = ['rsync', '--rsh=ssh -l root -o BatchMode=yes', '-lpgoq',
|
||||
"$syncip:/etc/pve/* /etc/cron.d/vzdump", '/etc/pve/master/',
|
||||
'--exclude', '*~' ];
|
||||
|
||||
eval {
|
||||
my $out = PVE::Utils::run_command ($cmd);
|
||||
};
|
||||
|
||||
my $err = $@;
|
||||
|
||||
if ($err) {
|
||||
my $cmdtxt = join (' ', @$cmd);
|
||||
die "syncing master configuration from '$syncip' failed ($cmdtxt) : $err\n";
|
||||
}
|
||||
|
||||
# verify that the remote host is cluster master
|
||||
|
||||
my $newcinfo = clusterinfo ('/etc/pve/master/cluster.cfg');
|
||||
|
||||
if (!$newcinfo->{master} || ($newcinfo->{master}->{ip} ne $syncip)) {
|
||||
die "host '$syncip' is not cluster master\n";
|
||||
}
|
||||
|
||||
if ($newcinfo->{local}->{role} ne 'N') {
|
||||
syslog ('info', "local host is no longer part of cluster '$syncip'");
|
||||
rename '/etc/pve/master/cluster.cfg', '/etc/pve/cluster.cfg';
|
||||
die "local host is no node of cluster '$syncip' " .
|
||||
"(role = $newcinfo->{local}->{role})\n";
|
||||
}
|
||||
|
||||
# we are part of the cluster
|
||||
|
||||
$cmpccfg = (system ("cmp -s /etc/pve/master/cluster.cfg /etc/pve/cluster.cfg") != 0)
|
||||
if -f '/etc/pve/master/cluster.cfg';
|
||||
|
||||
rename '/etc/pve/master/cluster.cfg', '/etc/pve/cluster.cfg' if $cmpccfg;
|
||||
|
||||
# check for storage changes
|
||||
|
||||
if (-f '/etc/pve/master/storage.cfg') {
|
||||
$cmpstoragecfg = (system ("cmp -s /etc/pve/master/storage.cfg /etc/pve/storage.cfg") != 0);
|
||||
rename '/etc/pve/master/storage.cfg', '/etc/pve/storage.cfg' if $cmpstoragecfg;
|
||||
} else {
|
||||
unlink '/etc/pve/storage.cfg';
|
||||
}
|
||||
|
||||
# check for vzdump crontab changes
|
||||
|
||||
$cmpvzdump = (system ("cmp -s /etc/pve/master/vzdump /etc/cron.d/vzdump") != 0)
|
||||
if -f '/etc/pve/master/vzdump';
|
||||
|
||||
# check for CA cerificate change
|
||||
if ((-f '/etc/pve/master/pve-root-ca.pem') && (-f '/etc/pve/master/pve-root-ca.key') &&
|
||||
(system ("cmp -s /etc/pve/master/pve-root-ca.pem /etc/pve/pve-root-ca.pem") != 0)) {
|
||||
rename '/etc/pve/master/pve-root-ca.pem', '/etc/pve/pve-root-ca.pem';
|
||||
rename '/etc/pve/master/pve-root-ca.key', '/etc/pve/pve-root-ca.key';
|
||||
my $serial = sprintf ("%04X000000000000", $newcinfo->{local}->{cid});
|
||||
update_serial ($serial);
|
||||
eval {
|
||||
# make sure we have a private key
|
||||
gen_pve_ssl_key();
|
||||
# force key rewrite
|
||||
gen_pve_ssl_cert (1, $newcinfo);
|
||||
};
|
||||
my $err = $@;
|
||||
if ($err) {
|
||||
syslog ('err', "pve key generation failed - try 'pcecert' manually");
|
||||
}
|
||||
}
|
||||
|
||||
$cmppvecfg = (system ("cmp -s /etc/pve/master/pve.cfg /etc/pve/pve.cfg") != 0)
|
||||
if -f '/etc/pve/master/pve.cfg';
|
||||
|
||||
rename '/etc/pve/master/pve.cfg', '/etc/pve/pve.cfg' if $cmppvecfg;
|
||||
|
||||
$cmpqemucfg = (system ("cmp -s /etc/pve/master/qemu-server.cfg /etc/pve/qemu-server.cfg") != 0)
|
||||
if -f '/etc/pve/master/qemu-server.cfg';
|
||||
|
||||
rename '/etc/pve/master/qemu-server.cfg', '/etc/pve/qemu-server.cfg' if $cmpqemucfg;
|
||||
|
||||
#fixme: store/remove additional files
|
||||
|
||||
}
|
||||
|
||||
if ($cmpccfg || # cluster info changed
|
||||
($syncip eq $lip)) { # or forced sync withe proxca -s
|
||||
|
||||
if ($cmpccfg) {
|
||||
syslog ('info', "detected changed cluster config");
|
||||
}
|
||||
|
||||
$cinfo = clusterinfo ();
|
||||
|
||||
my $changes = rewrite_keys ($cinfo);
|
||||
|
||||
if ($changes) {
|
||||
PVE::Utils::service_cmd ('sshd', 'reload');
|
||||
}
|
||||
|
||||
PVE::Utils::service_cmd ('pvetunnel', 'reload') if !$noreload;
|
||||
}
|
||||
|
||||
if ($cmppvecfg) { # pve.cfg settings changed
|
||||
|
||||
# fixme: implement me
|
||||
|
||||
}
|
||||
|
||||
if ($cmpqemucfg) { # qemu-server.cfg settings changed
|
||||
# nothing to do
|
||||
}
|
||||
|
||||
if ($cmpvzdump) {
|
||||
syslog ('info', "installing new vzdump crontab");
|
||||
rename '/etc/pve/master/vzdump', '/etc/cron.d/vzdump';
|
||||
}
|
||||
|
||||
if ($cmpstoragecfg) {
|
||||
my $storagecfg_new = PVE::Config::read_file ('storagecfg');
|
||||
|
||||
foreach my $sid (PVE::Storage::storage_ids ($storagecfg_old)) {
|
||||
my $ocfg = PVE::Storage::storage_config ($storagecfg_old, $sid);
|
||||
if (my $ncfg = PVE::Storage::storage_config ($storagecfg_new, $sid, 1)) {
|
||||
if (!$ocfg->{disable} && $ncfg->{disable}) {
|
||||
syslog ('info', "deactivate storage '$sid'");
|
||||
eval { PVE::Storage::deactivate_storage ($storagecfg_new, $sid); };
|
||||
syslog ('err', $@) if $@;
|
||||
}
|
||||
} else {
|
||||
if (!$ocfg->{disable}) {
|
||||
syslog ('info', "deactivate removed storage '$sid'");
|
||||
eval { PVE::Storage::deactivate_storage ($storagecfg_old, $sid); };
|
||||
syslog ('err', $@) if $@;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
sub vzlist_update {
|
||||
my ($cid, $ticket) = @_;
|
||||
|
||||
my $cinfo = clusterinfo ();
|
||||
|
||||
my $vzlist;
|
||||
|
||||
my $cvzl;
|
||||
|
||||
my $conn = PVE::ConfigClient::connect ($ticket);
|
||||
|
||||
my $ni;
|
||||
if (($ni = $cinfo->{"CID_$cid"})) {
|
||||
my $rcon = PVE::ConfigClient::connect ($ticket, $cinfo, $cid);
|
||||
$vzlist = $rcon->vzlist()->result;
|
||||
}
|
||||
|
||||
if ($vzlist) {
|
||||
$cvzl = $conn->cluster_vzlist($cid, $vzlist)->result;
|
||||
}
|
||||
|
||||
return $cvzl;
|
||||
}
|
||||
|
||||
sub load_vmconfig {
|
||||
my ($cinfo, $cid, $veid, $type, $ticket) = @_;
|
||||
|
||||
my $remcon = PVE::ConfigClient::connect ($ticket, $cinfo, $cid);
|
||||
my $vminfo = $remcon->vmconfig ($veid, $type)->result;
|
||||
|
||||
if (!$vminfo) {
|
||||
die "unable to get configuration data for VEID '$veid'";
|
||||
}
|
||||
|
||||
$vminfo->{ni} = $cinfo->{"CID_$cid"};
|
||||
|
||||
return $vminfo;
|
||||
}
|
||||
|
||||
sub sync_templates {
|
||||
my ($cinfo) = @_;
|
||||
|
||||
if ($cinfo->{master} && ($cinfo->{master}->{cid} != $cinfo->{local}->{cid})) {
|
||||
|
||||
my $remip = $cinfo->{master}->{ip};
|
||||
|
||||
my $cmd = ['rsync', '--rsh=ssh -l root -o BatchMode=yes', '-aq',
|
||||
'--delete', '--bwlimit=10240',
|
||||
"$remip:/var/lib/vz/template", "/var/lib/vz" ];
|
||||
|
||||
eval { PVE::Utils::run_command ($cmd); };
|
||||
|
||||
my $err = $@;
|
||||
|
||||
if ($err) {
|
||||
my $cmdtxt = join (' ', @$cmd);
|
||||
die "syncing template from master '$remip' failed ($cmdtxt) : $err\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
sub get_nextid {
|
||||
my ($vzlist, $vmops) = @_;
|
||||
|
||||
my $veexist = {};
|
||||
|
||||
PVE::Utils::foreach_vmrec ($vzlist, sub {
|
||||
my ($cid, $vmid) = @_;
|
||||
$veexist->{$1} = 1;
|
||||
});
|
||||
|
||||
PVE::Utils::foreach_vmrec ($vmops, sub {
|
||||
my ($cid, $vmid, $d) = @_;
|
||||
next if $d->{command} ne 'create';
|
||||
$veexist->{$1} = 1;
|
||||
});
|
||||
|
||||
my $nextveid;
|
||||
for (my $i = 101; $i < 10000; $i++) {
|
||||
if (!$veexist->{$i}) {
|
||||
$nextveid = $i;
|
||||
last;
|
||||
}
|
||||
}
|
||||
|
||||
return $nextveid;
|
||||
}
|
||||
|
||||
1;
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,165 +0,0 @@
|
||||
package PVE::HTMLControls;
|
||||
|
||||
use strict;
|
||||
use JSON;
|
||||
|
||||
my $uidcount = 0;
|
||||
|
||||
my %jsesc = ( "\n" => '\n',
|
||||
"\r" => '\r',
|
||||
"\t" => '\t',
|
||||
"\f" => '\f',
|
||||
"\b" => '\b',
|
||||
"\"" => '\"',
|
||||
"\\" => '\\\\',
|
||||
);
|
||||
|
||||
sub string_to_js {
|
||||
my $str = shift;
|
||||
$str =~ s/([\\\"\n\r\t\f\b])/$jsesc{$1}/eg;
|
||||
$str =~ s/([\x00-\x07\x0b\x0e-\x1f])/'\\u00' . unpack('H2',$1)/eg;
|
||||
return '"' . $str . '"';
|
||||
}
|
||||
|
||||
sub get_uid {
|
||||
my $prefix = shift || 'uid';
|
||||
|
||||
$uidcount++;
|
||||
|
||||
return $prefix . '_' . $$. '_' .$uidcount;
|
||||
}
|
||||
|
||||
# Ajax controls
|
||||
|
||||
sub create_log_viewer {
|
||||
my ($lvid, $service, $serviceid, $filterid, $statusid, $trackid) = @_;
|
||||
|
||||
$service = '' if !$service;
|
||||
|
||||
# trackid format: UID:$pid:/path/to/executable
|
||||
|
||||
$trackid = '' if !$trackid;
|
||||
|
||||
my $myupdater = get_uid ($lvid);
|
||||
|
||||
my $out = "<script type='text/javascript'><!--\n";
|
||||
$out .= <<__EOJS;
|
||||
|
||||
var $myupdater = new logViewer ('$lvid', '$service', '$serviceid', '$filterid', '$statusid', '$trackid');
|
||||
|
||||
$myupdater.start();
|
||||
|
||||
__EOJS
|
||||
|
||||
$out .= "--></script>\n";
|
||||
|
||||
return $out;
|
||||
}
|
||||
|
||||
sub create_wsviewer {
|
||||
my ($lvid, $statusid, $url, $args, $period) = @_;
|
||||
|
||||
my $myupdater = get_uid ($lvid);
|
||||
|
||||
$period = 10 if !$period;
|
||||
|
||||
$statusid = '' if !$statusid;
|
||||
|
||||
my $jsargs = to_json ($args);
|
||||
my $out = "<script type='text/javascript'><!--\n";
|
||||
$out .= <<__EOJS;
|
||||
|
||||
var $myupdater = new wsViewer ('$lvid', '$statusid', $period, '$url', $jsargs);
|
||||
|
||||
$myupdater.start();
|
||||
|
||||
__EOJS
|
||||
|
||||
$out .= "--></script>\n";
|
||||
|
||||
return $out;
|
||||
}
|
||||
|
||||
sub create_periodic_updater {
|
||||
my ($lvid, $url, $args, $period) = @_;
|
||||
|
||||
$period = 10 if !$period;
|
||||
|
||||
my $jsargs = to_json ($args);
|
||||
|
||||
$lvid = 'noautoupdate' if !$lvid;
|
||||
|
||||
my $out = "<script type='text/javascript'><!--\n";
|
||||
$out .= <<__EOJS;
|
||||
|
||||
new Ajax.PeriodicalUpdater ('$lvid', '$url', {
|
||||
frequency: $period,
|
||||
parameters: $jsargs
|
||||
});
|
||||
|
||||
__EOJS
|
||||
|
||||
$out .= "--></script>\n";
|
||||
return $out;
|
||||
}
|
||||
|
||||
# vzlist viewer
|
||||
|
||||
sub create_vzlist_viewer {
|
||||
my ($lvid, $statusid, $cid) = @_;
|
||||
|
||||
my $myupdater = get_uid ($lvid);
|
||||
|
||||
my $out = "<script type='text/javascript'><!--\n";
|
||||
$out .= <<__EOJS;
|
||||
|
||||
var $myupdater = new vzlistViewer ('$lvid', '$statusid', '$cid');
|
||||
|
||||
$myupdater.start();
|
||||
|
||||
__EOJS
|
||||
|
||||
$out .= "--></script>\n";
|
||||
|
||||
return $out;
|
||||
}
|
||||
|
||||
# server time viewer
|
||||
|
||||
sub create_time_viewer {
|
||||
my ($uid) = @_;
|
||||
|
||||
my $out = "\n<script type='text/javascript'><!--\n";
|
||||
$out .= <<__EOJS;
|
||||
|
||||
new timeViewer ('$uid');
|
||||
|
||||
__EOJS
|
||||
$out .= "--></script>\n";
|
||||
|
||||
return $out;
|
||||
}
|
||||
|
||||
sub create_command_viewer {
|
||||
my ($lvid, $statusid, $abortid, $upid) = @_;
|
||||
|
||||
my $jsvar = get_uid($lvid);
|
||||
|
||||
return '' if !defined ($upid);
|
||||
return '' if !defined ($abortid);
|
||||
|
||||
my $out = "\n<script type='text/javascript'><!--\n";
|
||||
$out .= <<__EOJS;
|
||||
|
||||
var $jsvar = new commandViewer ('$jsvar', '$lvid', '$upid', '$statusid', '$abortid');
|
||||
|
||||
$jsvar.start ();
|
||||
|
||||
__EOJS
|
||||
|
||||
$out .= "--></script>\n";
|
||||
|
||||
return $out;
|
||||
}
|
||||
|
||||
1;
|
@ -1,87 +0,0 @@
|
||||
package PVE::HTMLDropDown;
|
||||
|
||||
use strict;
|
||||
use vars qw(@ISA);
|
||||
|
||||
my $umenuid = 0;
|
||||
|
||||
sub new {
|
||||
my ($class) = @_;
|
||||
|
||||
my $self = {};
|
||||
$self->{count}=0;
|
||||
$self->{links}=0;
|
||||
$self->{uid} = "pvemenu_" . ++$umenuid;
|
||||
bless($self);
|
||||
return $self;
|
||||
}
|
||||
|
||||
sub add_item {
|
||||
my ($self,$name,$link,$text,$img) = @_;
|
||||
if (!(defined($self->{$name}->{count}))) { $self->{$name}->{count}=0; }
|
||||
$self->{$name}->{$self->{$name}->{count}}->{link} = $link;
|
||||
$self->{$name}->{$self->{$name}->{count}}->{text} = $text;
|
||||
$self->{$name}->{$self->{$name}->{count}}->{image} = $img;
|
||||
$self->{$name}->{count} = $self->{$name}->{count} + 1;
|
||||
$self->{$name}->{menuid} = $self->{uid} . "_" . $name;
|
||||
}
|
||||
|
||||
sub out_dropdown_menu {
|
||||
|
||||
my ($self,$name) = @_;
|
||||
my $i;
|
||||
my $br=0;
|
||||
|
||||
my $image = "/images/iarrdown.png";
|
||||
|
||||
my $menuid = $self->{$name}->{menuid};
|
||||
|
||||
my $html = "";
|
||||
$html .= "<div id=\"$menuid\" onMouseOut =\"dropdown('$menuid',0);\" onMouseOver=\"dropdown('$menuid',1);\" style=\"position:absolute; top:0px; left:0px; visibility: hidden;\">";
|
||||
|
||||
$html .= "<span style='width:15px; color:#FFFFFF;'><img alt='' src='$image' border=0></span><br>";
|
||||
|
||||
$html .= "<div class='dropdown'>";
|
||||
for $i (0 .. ($self->{$name}->{count}-1)) {
|
||||
|
||||
|
||||
if ($self->{$name}->{$i}->{text} eq "-" ) {
|
||||
$html = $html . "<hr width='175'>";
|
||||
$br=0;
|
||||
} else {
|
||||
if ($br == 1) {$html = $html . "<br>"; }
|
||||
my $img = $self->{$name}->{$i}->{image};
|
||||
my $imgtxt .= $img ? "<img alt='' src='$img' style='border:0px; vertical-align:text-bottom;'> " : '';
|
||||
my $txt = $self->{$name}->{$i}->{text};
|
||||
$txt =~ s/ / /g;
|
||||
$html .= "<a style='white-space:nowrap;' class='dropdown' id='${menuid}_ddlnk_$i' href='$self->{$name}->{$i}->{link}'>$imgtxt$txt</a>";
|
||||
$br=1;
|
||||
}
|
||||
}
|
||||
|
||||
$html .= "</div><br></div>";
|
||||
|
||||
return $html;
|
||||
}
|
||||
|
||||
sub out_symbol {
|
||||
my ($self,$name,$shape,$elink) = @_;
|
||||
my $html;
|
||||
|
||||
my $image = "/images/tarrdown.png";
|
||||
if ($shape) {
|
||||
$image = "/images/$shape.png";
|
||||
}
|
||||
|
||||
my $menuid = $self->{$name}->{menuid};
|
||||
|
||||
my $lnk_name = $menuid . "_lnk_" . $self->{links};
|
||||
if (defined($elink)) { $elink = ",'$elink'"; }
|
||||
$html = "<img alt='' style='cursor:pointer;' name='$lnk_name' src='$image' border=0 " .
|
||||
"onMousedown=\"javascript:dropdown('$menuid',1,'$lnk_name'$elink);\">";
|
||||
$self->{links} = $self->{links} + 1;
|
||||
return $html;
|
||||
}
|
||||
|
||||
1;
|
||||
|
@ -1,392 +0,0 @@
|
||||
package PVE::HTMLForm;
|
||||
|
||||
use strict;
|
||||
use HTML::Entities;
|
||||
use PVE::I18N;
|
||||
use PVE::HTMLTable;
|
||||
|
||||
sub new {
|
||||
my ($type, $formdata, $name) = @_;
|
||||
my $self = {};
|
||||
|
||||
$self->{formdata} = $formdata;
|
||||
$self->{elements} = 0;# internal element counter
|
||||
$self->{submit} = 0;
|
||||
$self->{name} = $name ? $name : "frm";
|
||||
|
||||
bless($self, $type);
|
||||
|
||||
$self->{action} = $self->{formdata}->{"form_$self->{name}_submit"};
|
||||
|
||||
$self->postaction;
|
||||
|
||||
return $self;
|
||||
}
|
||||
|
||||
sub postaction {
|
||||
my ($self) = @_;
|
||||
|
||||
my ($key, %d);
|
||||
|
||||
# Rebuild Date for IP, Bool and Time fields
|
||||
foreach $key (sort keys (%{$self->{formdata}})) {
|
||||
if ($key =~ m/ip_[0-9]+_(.*)/) {
|
||||
if (!(exists ($d{$1}))) {
|
||||
$d{$1}=1;
|
||||
defined ($self->{formdata}->{"ip_0_$1"}) ||
|
||||
($self->{formdata}->{"ip_0_$1"} = '0');
|
||||
defined ($self->{formdata}->{"ip_1_$1"}) ||
|
||||
($self->{formdata}->{"ip_1_$1"} = '0');
|
||||
defined ($self->{formdata}->{"ip_2_$1"}) ||
|
||||
($self->{formdata}->{"ip_2_$1"} = '0');
|
||||
defined ($self->{formdata}->{"ip_3_$1"}) ||
|
||||
($self->{formdata}->{"ip_3_$1"} = '0');
|
||||
$self->{formdata}->{"$1"} =
|
||||
$self->{formdata}->{"ip_0_$1"} . "." .
|
||||
$self->{formdata}->{"ip_1_$1"} . "." .
|
||||
$self->{formdata}->{"ip_2_$1"} . "." .
|
||||
$self->{formdata}->{"ip_3_$1"};
|
||||
}
|
||||
}
|
||||
if ($key =~ m/time_[0-9]+_(.*)/) {
|
||||
if (!(exists ($d{$1}))) {
|
||||
$d{$1}=1;
|
||||
defined ($self->{formdata}->{"time_0_$1"}) ||
|
||||
($self->{formdata}->{"time_0_$1"} = '00');
|
||||
defined ($self->{formdata}->{"time_1_$1"}) ||
|
||||
($self->{formdata}->{"time_1_$1"} = '00');
|
||||
$self->{formdata}->{"$1"} =
|
||||
$self->{formdata}->{"time_0_$1"} . ":" .
|
||||
$self->{formdata}->{"time_1_$1"};
|
||||
}
|
||||
}
|
||||
if ($key =~ m/cb_n_(.*)/) {
|
||||
if (!(exists ($d{$1}))) {
|
||||
my $name = $1;
|
||||
$d{$name} = 1;
|
||||
my $val = "";
|
||||
my $tmp;
|
||||
foreach my $k (keys (%{$self->{formdata}})) {
|
||||
if ($k =~ m/cb__(\w+)_$name/) {
|
||||
$tmp->{$1} = 1;
|
||||
}
|
||||
}
|
||||
foreach my $k (keys (%$tmp)) {
|
||||
$val .= " " if $val;
|
||||
$val .= $k;
|
||||
}
|
||||
$self->{formdata}->{"$1"} = $val;
|
||||
}
|
||||
}
|
||||
if ($key =~ m/bool_n_(.*)/) {
|
||||
if (!(exists ($d{$1}))) {
|
||||
$d{$1}=1;
|
||||
my $val = "0";
|
||||
if ($self->{formdata}->{"bool_$1"}) {
|
||||
$val = "1";
|
||||
}
|
||||
$self->{formdata}->{"$1"} = $val;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
sub action {
|
||||
my ($self) = @_;
|
||||
return $self->{action};
|
||||
}
|
||||
|
||||
sub create_element {
|
||||
my ($self, $name, $type, $value, $opt, $width) = @_;
|
||||
|
||||
my $out = '';
|
||||
|
||||
my $class = 'normal';
|
||||
|
||||
my $encvalue = encode_entities ($value);
|
||||
|
||||
$width = 200 if !$width;
|
||||
|
||||
my $innerwidth = $width - 5; # width - margin - border - padding
|
||||
|
||||
my $widthstr = "style='width:${innerwidth}px;'";
|
||||
|
||||
# normal text
|
||||
if ($type eq "text") {
|
||||
$out .= "<input $widthstr class='$class' type='text' name=$name value='$encvalue'/>";
|
||||
}
|
||||
elsif ($type eq "textarea") {
|
||||
my $rows = $opt || 4;
|
||||
my $rh = int ($rows*int(1.2*12+1));
|
||||
$out .= "<textarea class='$class' name=$name style='width:${innerwidth}px;height:${rh}px;' ROWS=$rows>$value</textarea>";
|
||||
}
|
||||
elsif ($type eq "viewonly") {
|
||||
$out .= "<input $widthstr disabled class='$class' readonly type='text' value='$encvalue'></input>";
|
||||
}
|
||||
# read only text
|
||||
elsif ($type eq "rotext") {
|
||||
$out .= "<input readonly $widthstr class='$class rotext' type='text' " .
|
||||
"name=${name} title='$encvalue' value='$encvalue'/>";
|
||||
}
|
||||
# server time
|
||||
elsif ($type eq "rotime") {
|
||||
my $uid = PVE::HTMLControls::get_uid('mytimer');
|
||||
$out .= "<div $widthstr class='bool input' id='$uid'>$encvalue</div>";
|
||||
$out .= PVE::HTMLControls::create_time_viewer ($uid);
|
||||
}
|
||||
# time of day
|
||||
elsif ($type eq "time") {
|
||||
my @tmp = split(/:/, $value);
|
||||
for my $i (0..1) {
|
||||
$out .= "<input type=text name=time_${i}_$name class='$class time' value='$tmp[$i]' />";
|
||||
$out .= " : " if !$i;
|
||||
}
|
||||
}
|
||||
# password
|
||||
elsif ($type eq "password") {
|
||||
$out .= "<input $widthstr class='$class' type='password' name=$name value='$encvalue'/>";
|
||||
}
|
||||
# number
|
||||
elsif ($type eq "number") {
|
||||
$out .= "<input $widthstr class='$class' type='text' id='$name' name='$name' value='$encvalue'/>";
|
||||
}
|
||||
# float
|
||||
elsif ($type eq "float") {
|
||||
$out .= "<input $widthstr class='$class' type='text' id='$name' name='$name' value='$encvalue'/>";
|
||||
}
|
||||
# boolean value (0, 1)
|
||||
elsif ($type eq "bool" || $type eq "robool" || $type eq 'dynamicbool' || $type eq "nbool") {
|
||||
my $checked = $value ? 'checked' : '';
|
||||
my $id = "bool_$name";
|
||||
|
||||
$out .= "<label><div class='$class bool' style='width:${innerwidth}px;text-align:center;vertical-align:bottom;'>";
|
||||
$out .= " ";
|
||||
if ($type eq 'dynamicbool') {
|
||||
$out .= "<input type='checkbox' name='$id' id='$id' $checked " .
|
||||
"onClick='javascript:pve_form_save(\"$self->{name}\", \"post\");'/>";
|
||||
} elsif ($type eq "robool") {
|
||||
$out .= "<input type='checkbox' disabled name='${id}_ro' $checked/>";
|
||||
} else {
|
||||
$out .= "<input type='checkbox' name='$id' id='$id' $checked/>";
|
||||
}
|
||||
|
||||
$out .= " ";
|
||||
$out .= "</div></label>";
|
||||
if ($type eq "robool") {
|
||||
$out .= "<input type='hidden' name='$id' id='$id' $checked/>";
|
||||
}
|
||||
$out .= "<input type='hidden' name='bool_n_$name' id='bool_n_$name' value='1'/>";
|
||||
}
|
||||
# dropdown
|
||||
elsif ($type eq "dropdown" || $type eq "dynamicdropdown") {
|
||||
|
||||
my $table = PVE::HTMLTable->new ([]);
|
||||
|
||||
my $titles;
|
||||
my $values;
|
||||
my $defvalue;
|
||||
if (ref($opt) eq 'ARRAY') {
|
||||
$values = $opt;
|
||||
} else {
|
||||
$values = $opt->{values};
|
||||
$defvalue = $opt->{default};
|
||||
foreach my $head (@{$opt->{titles}}) {
|
||||
push @$titles, 1, undef, $head;
|
||||
}
|
||||
}
|
||||
|
||||
$table->add_headline ($titles) if $titles;
|
||||
|
||||
if (defined($value)) {
|
||||
my $found;
|
||||
my $first;
|
||||
foreach my $elem (@$values) {
|
||||
my ($ev, $et, @da);
|
||||
if (ref ($elem) eq 'ARRAY') {
|
||||
($ev, $et, @da) = @$elem;
|
||||
} else {
|
||||
$ev = $et = $elem;
|
||||
}
|
||||
$first = $ev if !$first;
|
||||
$found = 1 if $ev eq $value;
|
||||
}
|
||||
if (!$found) {
|
||||
$value = defined ($defvalue) ? $defvalue : $first;
|
||||
}
|
||||
}
|
||||
|
||||
foreach my $elem (@$values) {
|
||||
my ($ev, $et, @da);
|
||||
if (ref ($elem) eq 'ARRAY') {
|
||||
($ev, $et, @da) = @$elem;
|
||||
} else {
|
||||
$ev = $et = $elem;
|
||||
}
|
||||
|
||||
push @da, $et if !scalar (@da);
|
||||
|
||||
if (!defined($value)) {
|
||||
$value = defined ($defvalue) ? $defvalue : $ev;
|
||||
}
|
||||
|
||||
my $checked = ($ev eq $value) ? 'checked="checked"' : '';
|
||||
|
||||
my $inp = "<input type='radio' short='$et' name='$name' value='$ev' $checked />";
|
||||
my @line;
|
||||
foreach my $dv (@da) {
|
||||
if ($inp) {
|
||||
push @line, "$inp$dv";
|
||||
$inp = undef;
|
||||
} else {
|
||||
push @line, $dv;
|
||||
}
|
||||
}
|
||||
|
||||
$table->add_row ('', @line);
|
||||
}
|
||||
|
||||
my $width1 = $width - 25;
|
||||
$out .= "<div class='selectblock' style='width:${width}px;position:relative;' id='selectblock_$name'>";
|
||||
$out .= "<div class='$class bool' style='white-space:nowrap;overflow:hidden;'><div style='display:block;float:right;'><img alt='' src='/images/tarrdown.png'></div><div style='width:${width1}px;overflow:hidden;'><span>$value</span></div></div>";
|
||||
|
||||
$out .= "<div class='selectbox'>";
|
||||
$out .= $table->out_table();
|
||||
$out .= "</div>";
|
||||
$out .= "</div>";
|
||||
|
||||
$out .= "<script language='javascript' type='text/javascript'>";
|
||||
if ($type eq "dynamicdropdown") {
|
||||
$out .= "new Selectbox('selectblock_$name','$self->{name}');";
|
||||
} else {
|
||||
$out .= "new Selectbox('selectblock_$name');";
|
||||
}
|
||||
$out .= "</script>";
|
||||
}
|
||||
# checkbox
|
||||
elsif ($type eq "checkbox") {
|
||||
my ($rows, $elref) = @$opt;
|
||||
my $sel;
|
||||
my @element = @$elref;
|
||||
map { $sel->{$_} = 1; } split ('\s', $value);
|
||||
$out .= "<table cellspacing=2 style='width:${width}px;' class='checkbox'>";
|
||||
for my $i (0 .. $#element/$rows) {
|
||||
$out .= "<tr>";
|
||||
for (my $j = 0; $j < $rows; $j++) {
|
||||
my $ind = $i*$rows + $j;
|
||||
last if $ind > $#element;
|
||||
my ($ev, $et) = ($element[$ind][0], $element[$ind][1]);
|
||||
my $val = $sel->{$ev} ? 'checked=true' : '';
|
||||
$out .= "<td><label>$et <input $val type=checkbox name='cb__${ev}_$name'></input></label></td>";
|
||||
}
|
||||
$out .= "</tr>";
|
||||
}
|
||||
$out .= "</table>";
|
||||
$out .= "<input type=hidden name='cb_n_$name' value='$#element'/>";
|
||||
}
|
||||
# ip address
|
||||
elsif ($type eq "ip") {
|
||||
my @tmp = split(/\./, $value);
|
||||
|
||||
$out .= "<table border=0 cellspacing=0 cellpadding=0><tr>";
|
||||
for my $i (0..3) {
|
||||
my $id = "ip_${i}_$name";
|
||||
my $nextid = $i < 3 ? "ip_" . ($i+1) . "_$name" : '';
|
||||
my $float = "style='float:left;";
|
||||
$out .= <<__EOD;
|
||||
<td><input class='$class ip' type='text' id='$id' name='$id' value='$tmp[$i]'
|
||||
onKeyUp="pve_form_validate_natural('$id', 255);"
|
||||
onKeyDown="return pve_form_ip_keyfilter(event,'$id','$nextid');"
|
||||
/>
|
||||
__EOD
|
||||
if ($i != 3) {
|
||||
$out .= "<td align=center style='width:8px;font-family:ARIAL;" .
|
||||
"font-weight:bold; font-size:14px;'>.</td>";
|
||||
}
|
||||
}
|
||||
$out .= "</tr></table>";
|
||||
|
||||
}
|
||||
# file upload
|
||||
elsif ($type eq "file") {
|
||||
# most wrowsers (firefox) ignore setting 'width', dont know how to fix
|
||||
$out .= "<input $widthstr class='$class' type='file' id='$name' name='$name'/>";
|
||||
}
|
||||
# hidden input
|
||||
elsif ($type eq "hidden") {
|
||||
if (defined ($value)) {
|
||||
$out .= "<input type='hidden' id='$name' name=$name value='$encvalue'/>";
|
||||
}
|
||||
}
|
||||
# Day of week
|
||||
elsif ($type eq "dow") {
|
||||
my $cl = { mon => '', tue => '', wed => '', thu => '',
|
||||
fri => '', sat => '', sun => '' };
|
||||
foreach my $day (split (/\s+/, $value)) {
|
||||
$cl->{$day} = 'checked';
|
||||
}
|
||||
my @dn = split (/\s+/, __("Mon Tue Wed Thu Fri Sat Sun"));
|
||||
my $w='15%';
|
||||
$out .= "<div $widthstr class='bool'><table border=0 cellspacing=2 cellpadding=0>";
|
||||
$out .= "<tr align=center><td width='$w'>$dn[0]<td width='$w'>$dn[1]<td width='$w'>$dn[2]";
|
||||
$out .= "<td width='$w'>$dn[3]<td width='$w'>$dn[4]<td width='$w'>$dn[5]<td width='$w'>$dn[6]</tr>";
|
||||
$out .= "<tr align=center>";
|
||||
$out .= "<td><input type=checkbox $cl->{mon} name='$name' value=mon>";
|
||||
$out .= "<td><input type=checkbox $cl->{tue} name='$name' value=tue>";
|
||||
$out .= "<td><input type=checkbox $cl->{wed} name='$name' value=wed>";
|
||||
$out .= "<td><input type=checkbox $cl->{thu} name='$name' value=thu>";
|
||||
$out .= "<td><input type=checkbox $cl->{fri} name='$name' value=fri>";
|
||||
$out .= "<td><input type=checkbox $cl->{sat} name='$name' value=sat>";
|
||||
$out .= "<td><input type=checkbox $cl->{sun} name='$name' value=sun>";
|
||||
$out .= "</tr></table></div>";
|
||||
}
|
||||
else {
|
||||
die "unknown elemet type '$type'";
|
||||
}
|
||||
|
||||
$out .= "\n";
|
||||
|
||||
return $out;
|
||||
}
|
||||
|
||||
sub create_cmdbutton {
|
||||
my ($self, $type, $text) = @_;
|
||||
|
||||
my $href = "javascript:pve_form_save(\"$self->{name}\", \"$type\");";
|
||||
|
||||
my $out = "<img alt='' style='vertical-align:text-bottom;width:15px; height:15px;' src='/images/tarrright.png'> ";
|
||||
|
||||
$text = $type if !$text;
|
||||
|
||||
if ($type eq "save") {
|
||||
$text = __('save');
|
||||
} elsif ($type eq "search") {
|
||||
$text = __('search');
|
||||
} elsif ($type eq "create") {
|
||||
$text = __('create');
|
||||
} elsif ($type eq "upload") {
|
||||
$text = __('upload');
|
||||
}
|
||||
|
||||
$out .= "<a href='$href' class='frmsubmit'>$text</a>";
|
||||
|
||||
return $out;
|
||||
}
|
||||
|
||||
sub create_header {
|
||||
my ($self, $action) = @_;
|
||||
|
||||
$action = '' if !$action;
|
||||
|
||||
return "<form style='margin:0px;' id='$self->{name}' action='$action' method='POST' ENCTYPE='multipart/form-data' accept-charset='UTF-8'>";
|
||||
}
|
||||
|
||||
sub create_footer {
|
||||
my $self = shift;
|
||||
|
||||
my $out = $self->create_element("form_$self->{name}_submit", 'hidden', 'post');
|
||||
$out .= "</form>";
|
||||
|
||||
return $out;
|
||||
}
|
||||
|
||||
1;
|
@ -1,94 +0,0 @@
|
||||
package PVE::HTMLGrid;
|
||||
|
||||
use strict;
|
||||
|
||||
# define some symbolic names for standard widths used
|
||||
my $col_widths = {
|
||||
fw => 735, # overall form width
|
||||
|
||||
fw1 => 150, # col1
|
||||
fw2 => 205, # col2
|
||||
fw4 => 205, # col4
|
||||
};
|
||||
|
||||
# compute width of col3
|
||||
$col_widths->{fw3} = $col_widths->{fw} -
|
||||
$col_widths->{fw1} - $col_widths->{fw2} - $col_widths->{fw4};
|
||||
|
||||
$col_widths->{fw3to4} = $col_widths->{fw3} + $col_widths->{fw4};
|
||||
$col_widths->{fw2to4} = $col_widths->{fw2} +
|
||||
$col_widths->{fw3} + $col_widths->{fw4};
|
||||
|
||||
sub get_width {
|
||||
my $name = shift;
|
||||
|
||||
die "internal error" if !defined ($col_widths->{$name});
|
||||
return $col_widths->{$name};
|
||||
}
|
||||
|
||||
sub new {
|
||||
my ($type, @wa) = @_;
|
||||
|
||||
my $self = {};
|
||||
|
||||
$self->{rowcount} = 0;
|
||||
$self->{colums} = scalar (@wa);
|
||||
$self->{data} = [];
|
||||
|
||||
my @awidth;
|
||||
my @aalign;
|
||||
foreach my $wd (@wa) {
|
||||
my ($w, $align) = split (/:/, $wd);
|
||||
|
||||
my $rw = $col_widths->{$w};
|
||||
$w = $rw if defined ($rw);
|
||||
|
||||
push @awidth, $w;
|
||||
push @aalign, $align;
|
||||
}
|
||||
|
||||
$self->{widths} = [ @awidth ];
|
||||
$self->{aligns} = [ @aalign ];
|
||||
|
||||
|
||||
bless($self);
|
||||
|
||||
return $self;
|
||||
}
|
||||
|
||||
sub add_row {
|
||||
my ($self, @cols) = @_;
|
||||
|
||||
push @{$self->{data}}, [ @cols ];
|
||||
}
|
||||
|
||||
sub html {
|
||||
my ($self) = @_;
|
||||
|
||||
my $out = "<table class=grid border=0 cellspacing=0 cellpadding=2>";
|
||||
my $widths = $self->{widths};
|
||||
my $aligns = $self->{aligns};
|
||||
for (my $i = 0; $i < $self->{colums}; $i++) {
|
||||
$out .= "<COL width='@$widths[$i]'>";
|
||||
}
|
||||
|
||||
foreach my $ca (@{$self->{data}}) {
|
||||
$out .= "<tr>";
|
||||
|
||||
for (my $i = 0; $i < $self->{colums}; $i++) {
|
||||
|
||||
my $align = @$aligns[$i] ? "align='@$aligns[$i]'" : '';
|
||||
$out .= "<td $align>@$ca[$i]</td>"
|
||||
}
|
||||
|
||||
$out .= "</tr>";
|
||||
}
|
||||
$out .= "</table>";
|
||||
|
||||
$self->{rowcount} = 0;
|
||||
$self->{data} = [];
|
||||
|
||||
return $out;
|
||||
}
|
||||
|
||||
1;
|
@ -1,568 +0,0 @@
|
||||
package PVE::HTMLServices;
|
||||
|
||||
use strict;
|
||||
use CGI '3.12';
|
||||
use mod_perl2;
|
||||
use Apache2::Const qw(:common);
|
||||
use HTML::Entities;
|
||||
use JSON;
|
||||
use IO::File;
|
||||
use POSIX qw(tzset strftime);
|
||||
use Text::Wrap qw(wrap);
|
||||
use PVE::Config;
|
||||
use PVE::I18N;
|
||||
use PVE::ConfigServer;
|
||||
use PVE::HTMLUtils;
|
||||
use PVE::HTMLTable;
|
||||
use PVE::SafeSyslog;
|
||||
|
||||
$PVE::HTMLServices::Obj = bless {
|
||||
helo => 'Helo',
|
||||
|
||||
methods => {
|
||||
index => { proto => "index ()" },
|
||||
command => { proto => "command (upid, did)" },
|
||||
command_abort => { "command_abort (upid)" },
|
||||
status => { proto => "status (cid)" },
|
||||
status_update => { proto => "status_update (cid)" },
|
||||
vzlist => { proto => "vzlist (cid)" },
|
||||
vmops => { proto => "vmops (inactive)" },
|
||||
vmlogview => { proto => "vmlogview (cid, veid, service)" },
|
||||
viewlog => { proto => "viewlog (service, filter)" },
|
||||
vmstatus => { proto => "vmstatus (cid, veid, type)" },
|
||||
hello => { proto => "hello ()" },
|
||||
servertime => { proto => "servertime ()" },
|
||||
},
|
||||
|
||||
};
|
||||
|
||||
sub ws_json_hello {
|
||||
my($conn, $args) = @_;
|
||||
|
||||
return {
|
||||
name => "A JSON Example",
|
||||
value => [ 'a', 'b'],
|
||||
};
|
||||
}
|
||||
|
||||
sub ws_servertime {
|
||||
|
||||
# trak TZ changes
|
||||
|
||||
POSIX::tzset();
|
||||
|
||||
my ($sec, $min, $hour) = localtime (time());
|
||||
|
||||
return sprintf ("%02d:%02d:%02d", $hour, $min, $sec);
|
||||
}
|
||||
|
||||
sub ws_json_vzlist {
|
||||
my($conn, $args) = @_;
|
||||
|
||||
my $cid = $args->{"cid"};
|
||||
|
||||
my $html;
|
||||
my $status;
|
||||
|
||||
eval {
|
||||
my $cvzl = PVE::Cluster::vzlist_update ($cid, $conn->{ticket});
|
||||
die "no data" if !$cvzl;
|
||||
$html = PVE::HTMLUtils::create_vzlist_table ($cid, $cvzl->{"CID_$cid"});
|
||||
|
||||
};
|
||||
|
||||
my $err = $@;
|
||||
|
||||
if ($err) {
|
||||
syslog ('err', $err);
|
||||
$html = "Unable to get data for Cluster Node $cid<br>";
|
||||
$status = "<blink><font color=red>Unable to load local cluster table</blink>";
|
||||
}
|
||||
|
||||
return {
|
||||
html => $html,
|
||||
status => $status || "Online",
|
||||
};
|
||||
}
|
||||
|
||||
sub ws_json_status {
|
||||
my($conn, $args) = @_;
|
||||
|
||||
my $cid = $args->{"cid"};
|
||||
my $verbose = $args->{"verbose"};
|
||||
|
||||
my $html;
|
||||
|
||||
my $cinfo = PVE::Cluster::clusterinfo ();
|
||||
|
||||
eval {
|
||||
my $rcon = PVE::ConfigClient::connect ($conn->{ticket}, $cinfo, $cid);
|
||||
my $status = $rcon->ping()->result;
|
||||
$html = PVE::HTMLUtils::create_host_status ($cinfo, $status, $verbose);
|
||||
};
|
||||
|
||||
my $err = $@;
|
||||
|
||||
if ($err) {
|
||||
syslog ('err', $err);
|
||||
|
||||
return {
|
||||
html => encode_entities ("ERROR: $err"),
|
||||
status => "Unable to get data for Cluster Node $cid<br>",
|
||||
};
|
||||
}
|
||||
|
||||
return {
|
||||
html => $html,
|
||||
status => "Online",
|
||||
};
|
||||
}
|
||||
|
||||
sub ws_status_update {
|
||||
my($conn, $args) = @_;
|
||||
|
||||
my $cid = $args->{"cid"};
|
||||
|
||||
my $html;
|
||||
|
||||
my $cinfo = PVE::Cluster::clusterinfo ();
|
||||
|
||||
my $ni = $cinfo->{"CID_$cid"};
|
||||
|
||||
my $role = '-';
|
||||
my $name = "Node $cid";
|
||||
my $nodeip = '-';
|
||||
|
||||
eval {
|
||||
|
||||
die "unknown CID '$cid'\n" if !$ni;
|
||||
|
||||
$role = $ni->{role};
|
||||
$role = 'Master' if $role eq 'M';
|
||||
$role = 'Node' if $role eq 'N';
|
||||
|
||||
$name = $ni->{name};
|
||||
$nodeip = $ni->{ip};
|
||||
|
||||
my $rcon = PVE::ConfigClient::connect ($conn->{ticket}, $cinfo, $cid);
|
||||
|
||||
my $status = $rcon->ping()->result;
|
||||
|
||||
my $state = $status->{insync} ? 'active' : '<blink><font color=red>nosync</font></blink>';
|
||||
|
||||
my $mem = int (0.5 + ($status->{meminfo}->{mbmemused}*100/$status->{meminfo}->{mbmemtotal}));
|
||||
my $disk = int (0.5 + ($status->{hdinfo}->{root}->{used}*100/$status->{hdinfo}->{root}->{avail}));
|
||||
|
||||
my $cpu = int ($status->{cpu}*100);
|
||||
my $wait = int ($status->{wait}*100);
|
||||
|
||||
$html = "<td>$name</td><td>$nodeip</td><td>$role</td><td>$state</td>" .
|
||||
"<td>$status->{uptime}->{uptimestrshort}</td>" .
|
||||
"<td>$status->{uptime}->{avg1}</td>" .
|
||||
"<td>$cpu%</td><td>$wait%</td><td>$mem%</td><td>$disk%</td>";
|
||||
|
||||
};
|
||||
|
||||
my $err = $@;
|
||||
|
||||
if ($err) {
|
||||
syslog ('err', $err);
|
||||
my $state = "<blink><font color=red>ERROR: " . encode_entities ($err) . "</blink>";
|
||||
return "<td>$name</td><td>$nodeip</td><td>$role</td><td colspan=7>$state</td>";
|
||||
}
|
||||
|
||||
return $html;
|
||||
}
|
||||
|
||||
sub ws_json_vmstatus {
|
||||
my($conn, $args) = @_;
|
||||
|
||||
my $cid = $args->{"cid"};
|
||||
my $veid = $args->{"veid"};
|
||||
my $type = $args->{"type"};
|
||||
|
||||
my $html;
|
||||
my $status = '';
|
||||
|
||||
my $cinfo = PVE::Cluster::clusterinfo ();
|
||||
|
||||
eval {
|
||||
my $vzinfo = PVE::Cluster::load_vmconfig ($cinfo, $cid, $veid, $type, $conn->{ticket});
|
||||
$html = PVE::HTMLUtils::create_vmstatus ($cid, $veid, $type, $vzinfo);
|
||||
};
|
||||
|
||||
my $err = $@;
|
||||
|
||||
if ($err) {
|
||||
syslog ('err', $err);
|
||||
$html = "Unable to get data for VM $veid<br>";
|
||||
$status = "<blink><font color=red>Unable to load virtual machine config</blink>";
|
||||
}
|
||||
|
||||
return {
|
||||
html => $html,
|
||||
status => $status,
|
||||
};
|
||||
}
|
||||
|
||||
sub ws_json_vmlogview {
|
||||
my($conn, $args) = @_;
|
||||
|
||||
my $cid = $args->{"cid"};
|
||||
my $veid = $args->{"veid"};
|
||||
my $service = $args->{"service"};
|
||||
|
||||
my $html = '';
|
||||
my $status;
|
||||
|
||||
my $cinfo = PVE::Cluster::clusterinfo ();
|
||||
|
||||
eval {
|
||||
my $ni = $cinfo->{"CID_$cid"} || die "unknown CID '$cid'";
|
||||
|
||||
my $rcon = PVE::ConfigClient::connect ($conn->{ticket}, $cinfo, $cid);
|
||||
my $lines = $rcon->vmlogview($cid, $veid, $service)->result;
|
||||
|
||||
foreach my $line (@$lines) {
|
||||
my $el = encode_entities ($line) . "<br>\n";
|
||||
if ($service eq 'init') {
|
||||
$el =~ s/&\#27;\[0;31m(.*)&\#27;\[0;39m/<font color=red>$1<\/font>/g;
|
||||
$el =~ s/&\#27;\[31m(.*)&\#27;\[39;49m/<font color=red>$1<\/font>/g;
|
||||
$el =~ s/&\#27;\[33m(.*)&\#27;\[39;49m/<font color=yellow>$1<\/font>/g;
|
||||
$el =~ s/&\#27;\[0;32m(.*)&\#27;\[0;39m/<font color=green>$1<\/font>/g;
|
||||
$el =~ s/&\#27;\[\d+G//g;
|
||||
}
|
||||
$html .= $el;
|
||||
}
|
||||
};
|
||||
|
||||
my $err = $@;
|
||||
|
||||
if ($err) {
|
||||
syslog ('err', $err);
|
||||
$html = "Unable to get data for Cluster Node $cid<br>";
|
||||
$status = "<blink><font color=red>Unable to load local cluster table</blink>";
|
||||
}
|
||||
|
||||
return {
|
||||
html => $html,
|
||||
status => $status || "Online",
|
||||
};
|
||||
}
|
||||
|
||||
# parse syslog line
|
||||
sub syslog_parse_line {
|
||||
my ($line) = @_;
|
||||
|
||||
my $rec;
|
||||
|
||||
if ($line =~
|
||||
m/^(\S+\s+\S+\s+\S+)\s+(\S+)\s+([^\s\[:]+)(\[(\S+)\])?([^:]*):\s+(.*)$/) {
|
||||
$rec->{date} = $1;
|
||||
$rec->{host} = $2;
|
||||
$rec->{prog} = $3;
|
||||
$rec->{prog} .= " $6" if $6;
|
||||
$rec->{pid} = $5;
|
||||
$rec->{text} = $7;
|
||||
} else {
|
||||
if ($line =~
|
||||
m/^(\S+\s+\S+\s+\S+)\s+(\S+)\s+(last message repeated \d+ times)$/) {
|
||||
$rec->{date} = $1;
|
||||
$rec->{host} = $2;
|
||||
$rec->{prog} = 'syslog';
|
||||
$rec->{pid} = 0;
|
||||
$rec->{text} = $3;
|
||||
} else {
|
||||
# unknown log format
|
||||
$rec->{date} = "0";
|
||||
$rec->{host} = "unknown";
|
||||
$rec->{prog} = "unknown";
|
||||
$rec->{pid} = "0";
|
||||
$rec->{text} = $line;
|
||||
}
|
||||
}
|
||||
|
||||
if (lc ($rec->{prog}) eq '/usr/sbin/cron') {
|
||||
$rec->{prog} = 'cron';
|
||||
}
|
||||
|
||||
return $rec;
|
||||
}
|
||||
|
||||
sub ws_json_viewlog {
|
||||
my($conn, $args) = @_;
|
||||
|
||||
my $out = '';
|
||||
|
||||
my $filter = $args->{"filter"};
|
||||
my $service = $args->{"service"} || '';
|
||||
my $trackid = $args->{"trackid"} || '';
|
||||
|
||||
$filter =~ s|\\|\\\\|g;
|
||||
$filter =~ s/\?/\\\?/g;
|
||||
$filter =~ s/\(/\\\(/g;
|
||||
$filter =~ s/\)/\\\)/g;
|
||||
$filter =~ s/\{/\\\{/g;
|
||||
$filter =~ s/\}/\\\}/g;
|
||||
$filter =~ s/\[/\\\[/g;
|
||||
$filter =~ s/\]/\\\]/g;
|
||||
$filter =~ s/\./\\\./g;
|
||||
$filter =~ s/\*/\\\*/g;
|
||||
$filter =~ s/\+/\\\+/g;
|
||||
|
||||
my $filename= "/var/log/syslog";
|
||||
|
||||
my $limit = 100;
|
||||
|
||||
if ($service eq 'apache') {
|
||||
$filename = "/var/log/apache2/access.log";
|
||||
}
|
||||
|
||||
my $running = 0;
|
||||
|
||||
if ($trackid) {
|
||||
my $rcon = PVE::ConfigClient::connect ($conn->{ticket});
|
||||
$running = $rcon->check_worker ($trackid)->result;
|
||||
}
|
||||
|
||||
$out .= "<table border=0 cellspacing=3 cellpadding=0 style='font-family:monospace;'>";
|
||||
|
||||
if ($filename eq '/var/log/syslog') {
|
||||
my $loga;
|
||||
my $needhost;
|
||||
|
||||
open (TMP, "tail -$limit $filename|");
|
||||
while (my $line = <TMP>) {
|
||||
if (my $rec = syslog_parse_line ($line)) {
|
||||
next if $filter && $line !~ m/$filter/i;
|
||||
next if ($service && ($rec->{prog} !~ m"(^$service\/|\/$service$|^$service$)"));
|
||||
|
||||
push @$loga, $rec;
|
||||
}
|
||||
}
|
||||
close (TMP);
|
||||
|
||||
|
||||
foreach my $rec (@$loga) {
|
||||
$out .= "<tr><td nowrap>" . encode_entities ($rec->{date}) . " </td>";
|
||||
if ($needhost) {
|
||||
$out .= "<td nowrap>" . encode_entities ($rec->{host}) . "</td>";
|
||||
}
|
||||
|
||||
$rec->{prog} =~ s|^postfix/||;
|
||||
|
||||
$out .= "<td nowrap>" . encode_entities ($rec->{prog}) . "</td>";
|
||||
$out .= "<td align=right nowrap>" . $rec->{pid} . " </td>";
|
||||
$out .= "<td nowrap>" . encode_entities ($rec->{text}) . "</td>";
|
||||
$out .= "</tr>";
|
||||
}
|
||||
} else {
|
||||
open (TMP, "tail -$limit $filename|");
|
||||
while (my $line = <TMP>) {
|
||||
chomp $line;
|
||||
next if $filter && $line !~ m/$filter/i;
|
||||
$line = encode_entities ($line);
|
||||
$out .= "<tr><td nowrap>" . $line . "</td></tr>";
|
||||
}
|
||||
close (TMP);
|
||||
}
|
||||
$out .= "</table>\n";
|
||||
|
||||
if ($trackid) {
|
||||
return {
|
||||
html => $out,
|
||||
status => $running ? "Update in progress" : "Update finished",
|
||||
running => $running,
|
||||
};
|
||||
} else {
|
||||
return {
|
||||
html => $out,
|
||||
status => "Online",
|
||||
running => 1,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
sub ws_json_vmops {
|
||||
my($conn, $args) = @_;
|
||||
|
||||
my $inactive = $args->{"inactive"};
|
||||
|
||||
my $vmops = PVE::Config::read_file ("vmops");
|
||||
my $out = PVE::HTMLUtils::create_vmops_table ($vmops, $inactive);
|
||||
|
||||
return { html => $out, status => 'OK' };
|
||||
}
|
||||
|
||||
sub ws_command_abort {
|
||||
my($conn, $args) = @_;
|
||||
|
||||
my $upid = $args->{"upid"};
|
||||
|
||||
my $rcon = PVE::ConfigClient::connect ($conn->{ticket});
|
||||
$rcon->check_worker ($upid, 1);
|
||||
}
|
||||
|
||||
sub ws_json_command {
|
||||
my($conn, $args) = @_;
|
||||
|
||||
my $out = '';
|
||||
|
||||
my $upid = $args->{"upid"};
|
||||
my $jsvar = $args->{"jsvar"};
|
||||
|
||||
my $upid_hash = PVE::Utils::upid_decode ($upid);
|
||||
|
||||
my $cmdtype = $upid_hash->{type}; # 'vmops', 'apldownload'
|
||||
|
||||
if (!$upid_hash || !$upid_hash->{filename}) {
|
||||
return {
|
||||
html => '',
|
||||
running => 0,
|
||||
status => "got strange parameters $upid"
|
||||
};
|
||||
}
|
||||
|
||||
my $filename = $upid_hash->{filename};
|
||||
|
||||
my $fh = new IO::File $filename, "r";
|
||||
if (!defined ($fh)) {
|
||||
return {
|
||||
html => '',
|
||||
running => 1,
|
||||
status => "unable to open output file '$filename'" };
|
||||
}
|
||||
|
||||
my $savedid = <$fh>;
|
||||
chomp $savedid;
|
||||
|
||||
if ($savedid ne $upid) {
|
||||
return { html => '', running => 0, status => "no data"};
|
||||
}
|
||||
|
||||
my $out = '';
|
||||
my $line;
|
||||
|
||||
while (defined ($line = <$fh>)) {
|
||||
chomp $line;
|
||||
|
||||
# skip ssh warning
|
||||
next if $line =~ m/^tcgetattr: Inappropriate ioctl for device$/;
|
||||
|
||||
my $stat = '';
|
||||
while (defined ($line) && $line =~ m/^rsync\s+status:/) {
|
||||
$stat = $line;
|
||||
if (defined ($line = <$fh>)) {
|
||||
chomp $line;
|
||||
}
|
||||
}
|
||||
|
||||
$out .= encode_entities ($stat) . "<br>" if $stat;
|
||||
|
||||
$out .= encode_entities ($line) . "<br>" if defined ($line);;
|
||||
}
|
||||
|
||||
$fh->close;
|
||||
|
||||
my $rcon = PVE::ConfigClient::connect ($conn->{ticket});
|
||||
my $running = $rcon->check_worker ($upid)->result;
|
||||
|
||||
my $status;
|
||||
|
||||
if ($cmdtype eq 'apldownload') {
|
||||
$status = $running ? "downloading '$upid_hash->{apl}'" : "download finished";
|
||||
} else {
|
||||
$status = $running ? "executing command" : "command finished";
|
||||
}
|
||||
return {
|
||||
html => $out,
|
||||
status => $status,
|
||||
running => $running,
|
||||
};
|
||||
}
|
||||
|
||||
sub ws_index {
|
||||
my($conn, $args) = @_;
|
||||
|
||||
my $obj = $conn->{server};
|
||||
|
||||
my $out = "Proxmox Web Service Description<br><br>";
|
||||
|
||||
foreach my $m (keys %{$obj->{methods}}) {
|
||||
my $proto = $obj->{methods}->{$m}->{proto};
|
||||
$out .= "METHOD: $proto<br>";
|
||||
}
|
||||
|
||||
return $out;
|
||||
}
|
||||
|
||||
sub handler ($$) {
|
||||
my($obj, $r) = @_;
|
||||
|
||||
my $auth_type = $r->ap_auth_type;
|
||||
my $uri = $r->uri;
|
||||
|
||||
my $cookie_name = $auth_type->cookie_name ($r);
|
||||
my $cookie = $auth_type->key ($r);
|
||||
|
||||
my ($username, $group) = split /::/, $cookie;
|
||||
|
||||
my $conn = {
|
||||
server => $obj,
|
||||
request => $r,
|
||||
uri => $uri,
|
||||
user => $username,
|
||||
group => $group,
|
||||
ticket => $cookie,
|
||||
};
|
||||
|
||||
my $pvecfg = PVE::Config::read_file ('pvecfg');
|
||||
my $language = $pvecfg->{language} || 'C';
|
||||
PVE::I18N::set_lang ($language);
|
||||
|
||||
my $path = $r->path_info;
|
||||
if ($path =~ m'^/?(\w+)(\.htm|\.pl)?$' && $obj->{methods}->{$1}) {
|
||||
my $name = $1;
|
||||
|
||||
my $cgi = CGI->new ($r);
|
||||
|
||||
my $arglist = $cgi->Vars();
|
||||
|
||||
$r->no_cache (1);
|
||||
|
||||
if (my $serv = $obj->can ("ws_script_$name")) {
|
||||
my $data = &$serv ($conn, $arglist);
|
||||
my $x = length ($data);
|
||||
$r->content_type ('application/javascript');
|
||||
$r->headers_out->set ("Content-length", "$x");
|
||||
$r->headers_out->set ("Pragma", "no-cache");
|
||||
$r->print ($data);
|
||||
return OK;
|
||||
} elsif (my $serv = $obj->can ("ws_json_$name")) {
|
||||
my $data = &$serv ($conn, $arglist);
|
||||
my $js = to_json($data, {utf8 => 1});
|
||||
my $x = length ($js);
|
||||
$r->content_type ('application/json');
|
||||
$r->headers_out->set ("Content-length", "$x");
|
||||
$r->headers_out->set ("Pragma", "no-cache");
|
||||
$r->print ($js);
|
||||
return OK;
|
||||
} elsif (my $serv = $obj->can ("ws_$name")) {
|
||||
my $data = &$serv ($conn, $arglist);
|
||||
my $x = length ($data);
|
||||
$r->content_type ('text/html');
|
||||
$r->headers_out->set ("Content-length", "$x");
|
||||
$r->headers_out->set ("Pragma", "no-cache");
|
||||
$r->print ($data);
|
||||
return OK;
|
||||
} else {
|
||||
return NOT_FOUND;
|
||||
}
|
||||
} else {
|
||||
return NOT_FOUND;
|
||||
}
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
||||
1;
|
@ -1,178 +0,0 @@
|
||||
package PVE::HTMLTable;
|
||||
|
||||
use strict;
|
||||
use vars qw(@ISA);
|
||||
|
||||
sub new {
|
||||
my ($type, $width) = @_;
|
||||
|
||||
my $self = {};
|
||||
|
||||
$self->{rowcount} = 0;
|
||||
$self->{link_edit} = '';
|
||||
$self->{width} = $width;
|
||||
bless($self);
|
||||
|
||||
return $self;
|
||||
}
|
||||
sub link_edit {
|
||||
my ($self, $v) = @_;
|
||||
if (defined($v)) {
|
||||
$self->{link_edit} = $v;
|
||||
}
|
||||
$self->{link_edit};
|
||||
}
|
||||
|
||||
sub add_headline {
|
||||
my ($self,$headinfo) = @_;
|
||||
$self->{headline} = $headinfo;
|
||||
}
|
||||
|
||||
sub set_param {
|
||||
my ($self, $v) = @_;
|
||||
if (defined($v)) {
|
||||
$self->{rowdata}->{$self->{rowcount}}->{param} = $self->{rowdata}->{$self->{rowcount}}->{param} . "&" . $v;
|
||||
}
|
||||
return "";
|
||||
}
|
||||
sub get_param {
|
||||
my ($self, $row) = @_;
|
||||
if (defined($row)) {
|
||||
return $self->{rowdata}->{$row}->{param};
|
||||
} else {
|
||||
return "";
|
||||
}
|
||||
}
|
||||
sub set_row_link {
|
||||
my ($self,$lnk,$row) = @_;
|
||||
my $i;
|
||||
if (!(defined($row))) { $row = $self->{rowcount}; }
|
||||
$self->{rowdata}->{$row}->{lnk} = $lnk;
|
||||
return $self;
|
||||
}
|
||||
|
||||
sub set_col_span {
|
||||
my ($self,$span,$row) = @_;
|
||||
if (!(defined($row))) { $row = $self->{rowcount}; }
|
||||
$self->{rowdata}->{$row}->{span} = $span;
|
||||
return $self;
|
||||
}
|
||||
|
||||
sub add_row {
|
||||
my ($self,$id,@row) = @_;
|
||||
my $i;
|
||||
|
||||
$self->{rowdata}->{$self->{rowcount}}->{len} = $#row;
|
||||
$self->{rowdata}->{$self->{rowcount}}->{id} = $id;
|
||||
|
||||
for $i (0 .. $#row) {
|
||||
$self->{rowdata}->{$self->{rowcount}}->{"$i"} = $row[$i];
|
||||
}
|
||||
$self->{rowcount} = $self->{rowcount} + 1;
|
||||
return $self;
|
||||
}
|
||||
|
||||
sub out_header {
|
||||
my ($self, $width) = @_;
|
||||
|
||||
# NOTE: width = 100% if not specified
|
||||
# but you can also pass 0 or '' to avoid that behaviour
|
||||
|
||||
if (!defined ($width)) { $width='100%'; }
|
||||
|
||||
my $htmlout = "<table class='normal' cellspacing=0 cellpadding=3";
|
||||
|
||||
$htmlout .= " style='width:$width;'" if $width;
|
||||
|
||||
$htmlout .= ">";
|
||||
|
||||
return $htmlout;
|
||||
}
|
||||
|
||||
sub out_headline {
|
||||
my ($self) = @_;
|
||||
|
||||
return "" if !$self->{headline};
|
||||
|
||||
my @headinfo = @{$self->{headline}};
|
||||
|
||||
my $htmlout = "<thead><tr>";
|
||||
for my $i (0 .. ($#headinfo/3)) {
|
||||
my ($span, $width, $text) = ($headinfo[$i*3], $headinfo[($i*3)+1],$headinfo[($i*3)+2]);
|
||||
$htmlout .= "<th colspan=$span ";
|
||||
$htmlout .= " style='width:$width;'" if $width;
|
||||
$htmlout .= ">$text</th>";
|
||||
}
|
||||
$htmlout .= "</tr></thead>";
|
||||
return $htmlout;
|
||||
}
|
||||
|
||||
|
||||
sub out_footer {
|
||||
my ($self) = @_;
|
||||
|
||||
return "</table>";
|
||||
}
|
||||
|
||||
sub out_celldata {
|
||||
my ($self,$row,$col) = @_;
|
||||
my $data = $self->{rowdata}->{"$row"}->{"$col"};
|
||||
return $data;
|
||||
}
|
||||
|
||||
sub out_table {
|
||||
my ($self, $width, $sel) = @_;
|
||||
|
||||
my $htmlout = "";
|
||||
my $col1 = "#EDEDED";
|
||||
my $col2 = "#FFFFFF";
|
||||
my $col3 = "#FFF3BF";
|
||||
# Tableheader
|
||||
$htmlout .= $self->out_header($width);
|
||||
|
||||
# Tableheadline
|
||||
$htmlout .= $self->out_headline ();
|
||||
|
||||
$htmlout .= "<tbody>";
|
||||
|
||||
#Tablecontent
|
||||
for my $i (0 .. ($self->{rowcount}-1)) {
|
||||
my $col = $i % 2 ? $col2 : $col1;
|
||||
|
||||
$col = $col3 if defined ($sel) && $sel == $i;
|
||||
|
||||
$htmlout .= "<tr style='background-color:$col;'";
|
||||
|
||||
my $rid = $self->{rowdata}->{$i}->{id};
|
||||
$htmlout .= " id='$rid'" if $rid;
|
||||
|
||||
if (defined($self->{rowdata}->{$i}->{lnk})) {
|
||||
$htmlout .= " class='link' onClick='goTo(\"$self->{rowdata}->{$i}->{lnk}\");'";
|
||||
}
|
||||
|
||||
$htmlout .= ">";
|
||||
|
||||
my @wa = @{$self->{width}};
|
||||
my $span = $self->{rowdata}->{$i}->{span};
|
||||
for my $c (0 .. $self->{rowdata}->{"$i"}->{len}) {
|
||||
my $sw = "";
|
||||
if (defined ($span) && (@$span[$c] > 1)) {
|
||||
$sw = "colspan=@$span[$c]";
|
||||
}
|
||||
my $wtxt = $wa[$c] ? "width:$wa[$c];" : '';
|
||||
$htmlout .= "<td $sw style='$wtxt'>".$self->out_celldata($i, $c)."</td>";
|
||||
|
||||
$c += @$span[$c] - 1 if $sw;
|
||||
}
|
||||
$htmlout .= "</tr>\n";
|
||||
}
|
||||
|
||||
$htmlout .= "</tbody>";
|
||||
|
||||
# Tablefooter
|
||||
$htmlout .= $self->out_footer();
|
||||
|
||||
return $htmlout;
|
||||
}
|
||||
|
||||
1;
|
File diff suppressed because it is too large
Load Diff
@ -1,94 +0,0 @@
|
||||
package PVE::I18N;
|
||||
|
||||
use strict;
|
||||
require Exporter;
|
||||
use vars qw(@ISA @EXPORT);
|
||||
use Encode;
|
||||
use HTML::Entities;
|
||||
use Locale::Messages qw (:libintl_h dgettext);
|
||||
|
||||
@ISA = qw(Exporter);
|
||||
@EXPORT = qw( __ );
|
||||
|
||||
my $nlsinited;
|
||||
my $language = 'C';
|
||||
my $lang_is_utf8 = 0;
|
||||
|
||||
my %textdomains = ();
|
||||
|
||||
|
||||
sub import
|
||||
{
|
||||
my ($self, $textdomain) = @_;
|
||||
|
||||
# like Locale/TextDomain.pm
|
||||
# usage: use PVE::I18N qw(<textdomain>)
|
||||
|
||||
$textdomain = 'pve-manager' if !$textdomain;
|
||||
|
||||
# Check our caller.
|
||||
my $package = caller;
|
||||
return if exists $textdomains{$package};
|
||||
|
||||
# Remember the textdomain of that package.
|
||||
$textdomains{$package} = $textdomain;
|
||||
|
||||
PVE::I18N->export_to_level (1, $package, @EXPORT);
|
||||
}
|
||||
|
||||
sub get_lang {
|
||||
|
||||
my $section = 'default';
|
||||
my $lang = 'C';
|
||||
|
||||
open (SYSCFG, "</etc/pve/pve.cfg") || return $lang;
|
||||
while (my $line = <SYSCFG>) {
|
||||
chomp $line;
|
||||
if ($line =~ m/\s*language\s*:\s*(\S+)\s*$/) {
|
||||
$lang = $1;
|
||||
last;
|
||||
}
|
||||
}
|
||||
close (SYSCFG);
|
||||
|
||||
return $lang;
|
||||
}
|
||||
|
||||
sub set_lang {
|
||||
my $lang = shift;
|
||||
|
||||
$language = $lang;
|
||||
|
||||
$lang_is_utf8 = scalar (grep { $language eq $_ } qw (vi pl ja hu ro ru fr tr zh_CN sr cs sl))
|
||||
}
|
||||
|
||||
if (!$nlsinited) {
|
||||
|
||||
set_lang (get_lang);
|
||||
|
||||
$nlsinited = 1;
|
||||
}
|
||||
|
||||
sub __ {
|
||||
my $msgid = shift;
|
||||
my $oldlang = $ENV{LANGUAGE};
|
||||
my $oldlc_all = $ENV{LC_ALL};
|
||||
$ENV{LANGUAGE} = $language;
|
||||
|
||||
my $package = caller;
|
||||
my $textdomain = $textdomains{$package};
|
||||
|
||||
my $res = dgettext($textdomain, $msgid);
|
||||
|
||||
if ($lang_is_utf8) {
|
||||
$res = decode('UTF-8', $res) ;
|
||||
} else {
|
||||
$res = decode('iso-8859-1', $res) ;
|
||||
}
|
||||
|
||||
$ENV{LANGUAGE} = $oldlang || '';
|
||||
$ENV{LC_ALL} = $oldlc_all || '';
|
||||
return $res;
|
||||
}
|
||||
|
||||
1;
|
@ -1,45 +0,0 @@
|
||||
package PVE::SourceFilter;
|
||||
|
||||
use Filter::Util::Call;
|
||||
use Data::Dumper;
|
||||
|
||||
$Data::Dumper::Indent = 0;
|
||||
|
||||
sub import
|
||||
{
|
||||
my($type, @arguments) = @_;
|
||||
|
||||
my $stat = {};
|
||||
filter_add ($stat) ;
|
||||
}
|
||||
|
||||
sub filter
|
||||
{
|
||||
my($self) = @_ ;
|
||||
my($status) ;
|
||||
|
||||
$status = filter_read();
|
||||
if ($status <= 0) {
|
||||
return $status;
|
||||
}
|
||||
|
||||
if (m/^package\s+(\S+);/) {
|
||||
foreach my $k (keys %$self) {delete $self->{$k}; }
|
||||
$self->{packagename} = $1;
|
||||
}
|
||||
|
||||
if (m/^\s*\#\#FILTER_DATA\#\#/) {
|
||||
my $dtxt = Data::Dumper->Dump ([{%$self}], [qw(stats)]);
|
||||
$_ = "sub filter_data { my $dtxt; die \"PVE::SourceFilter - internal error\" if \$stats->{packagename} ne __PACKAGE__; return \$stats; }\n";
|
||||
}
|
||||
|
||||
if (m/^sub\s+(\w+)\s.*\#\#SOAP_EXPORT\#\#/) {
|
||||
$self->{soap_exports}->{$1} = 1;
|
||||
}
|
||||
|
||||
$self->{lines}++;
|
||||
|
||||
$status ;
|
||||
}
|
||||
|
||||
1;
|
@ -1,27 +0,0 @@
|
||||
package PVE::URLRewrite;
|
||||
|
||||
use strict;
|
||||
use Apache2::Const qw(DECLINED);
|
||||
use PVE::HTMLUtils;
|
||||
|
||||
sub handler {
|
||||
my $r = shift;
|
||||
|
||||
my $uri = $r->uri;
|
||||
|
||||
if ($uri =~ m!^/(qemu|openvz)/(\d+)-(\d+)/(.*)$!) {
|
||||
my $vmtype = $1;
|
||||
my $newuri = "/$1/$4";
|
||||
my $cid = $2;
|
||||
my $veid = $3;
|
||||
|
||||
$r->uri ("$newuri");
|
||||
|
||||
$r->pnotes ("PVE_VMINFO", { cid => $cid, veid => $veid,
|
||||
vmtype => $vmtype, uri => $uri});
|
||||
}
|
||||
|
||||
return DECLINED;
|
||||
}
|
||||
|
||||
1;
|
1024
lib/PVE.old/Utils.pm
1024
lib/PVE.old/Utils.pm
File diff suppressed because it is too large
Load Diff
@ -1,14 +0,0 @@
|
||||
include $(top_builddir)/common.mk
|
||||
|
||||
SUBDIRS=
|
||||
|
||||
pvelib_DATA = \
|
||||
Cluster.pm \
|
||||
Nodes.pm \
|
||||
Tasks.pm \
|
||||
Network.pm \
|
||||
Services.pm
|
||||
|
||||
CLEANFILES = *~
|
||||
|
||||
pvelibdir = @PERL_LIBDIR@/PVE/API2
|
@ -1,18 +0,0 @@
|
||||
include $(top_builddir)/common.mk
|
||||
|
||||
SUBDIRS= API2
|
||||
|
||||
PERLSOURCE = \
|
||||
API2.pm \
|
||||
API2Client.pm \
|
||||
APIDaemon.pm \
|
||||
REST.pm \
|
||||
APLInfo.pm
|
||||
|
||||
BUILDDATA = pvecfg.pm
|
||||
|
||||
pvelib_DATA = $(BUILDDATA) $(PERLSOURCE)
|
||||
|
||||
CLEANFILES = $(BUILDDATA) *~
|
||||
|
||||
pvelibdir = @PERL_LIBDIR@/PVE
|
360
missing
360
missing
@ -1,360 +0,0 @@
|
||||
#! /bin/sh
|
||||
# Common stub for a few missing GNU programs while installing.
|
||||
|
||||
scriptversion=2005-06-08.21
|
||||
|
||||
# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005
|
||||
# Free Software Foundation, Inc.
|
||||
# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, 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 General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
# 02110-1301, USA.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
if test $# -eq 0; then
|
||||
echo 1>&2 "Try \`$0 --help' for more information"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
run=:
|
||||
|
||||
# In the cases where this matters, `missing' is being run in the
|
||||
# srcdir already.
|
||||
if test -f configure.ac; then
|
||||
configure_ac=configure.ac
|
||||
else
|
||||
configure_ac=configure.in
|
||||
fi
|
||||
|
||||
msg="missing on your system"
|
||||
|
||||
case "$1" in
|
||||
--run)
|
||||
# Try to run requested program, and just exit if it succeeds.
|
||||
run=
|
||||
shift
|
||||
"$@" && exit 0
|
||||
# Exit code 63 means version mismatch. This often happens
|
||||
# when the user try to use an ancient version of a tool on
|
||||
# a file that requires a minimum version. In this case we
|
||||
# we should proceed has if the program had been absent, or
|
||||
# if --run hadn't been passed.
|
||||
if test $? = 63; then
|
||||
run=:
|
||||
msg="probably too old"
|
||||
fi
|
||||
;;
|
||||
|
||||
-h|--h|--he|--hel|--help)
|
||||
echo "\
|
||||
$0 [OPTION]... PROGRAM [ARGUMENT]...
|
||||
|
||||
Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
|
||||
error status if there is no known handling for PROGRAM.
|
||||
|
||||
Options:
|
||||
-h, --help display this help and exit
|
||||
-v, --version output version information and exit
|
||||
--run try to run the given command, and emulate it if it fails
|
||||
|
||||
Supported PROGRAM values:
|
||||
aclocal touch file \`aclocal.m4'
|
||||
autoconf touch file \`configure'
|
||||
autoheader touch file \`config.h.in'
|
||||
automake touch all \`Makefile.in' files
|
||||
bison create \`y.tab.[ch]', if possible, from existing .[ch]
|
||||
flex create \`lex.yy.c', if possible, from existing .c
|
||||
help2man touch the output file
|
||||
lex create \`lex.yy.c', if possible, from existing .c
|
||||
makeinfo touch the output file
|
||||
tar try tar, gnutar, gtar, then tar without non-portable flags
|
||||
yacc create \`y.tab.[ch]', if possible, from existing .[ch]
|
||||
|
||||
Send bug reports to <bug-automake@gnu.org>."
|
||||
exit $?
|
||||
;;
|
||||
|
||||
-v|--v|--ve|--ver|--vers|--versi|--versio|--version)
|
||||
echo "missing $scriptversion (GNU Automake)"
|
||||
exit $?
|
||||
;;
|
||||
|
||||
-*)
|
||||
echo 1>&2 "$0: Unknown \`$1' option"
|
||||
echo 1>&2 "Try \`$0 --help' for more information"
|
||||
exit 1
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
# Now exit if we have it, but it failed. Also exit now if we
|
||||
# don't have it and --version was passed (most likely to detect
|
||||
# the program).
|
||||
case "$1" in
|
||||
lex|yacc)
|
||||
# Not GNU programs, they don't have --version.
|
||||
;;
|
||||
|
||||
tar)
|
||||
if test -n "$run"; then
|
||||
echo 1>&2 "ERROR: \`tar' requires --run"
|
||||
exit 1
|
||||
elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
|
||||
*)
|
||||
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
|
||||
# We have it, but it failed.
|
||||
exit 1
|
||||
elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
|
||||
# Could not run --version or --help. This is probably someone
|
||||
# running `$TOOL --version' or `$TOOL --help' to check whether
|
||||
# $TOOL exists and not knowing $TOOL uses missing.
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
# If it does not exist, or fails to run (possibly an outdated version),
|
||||
# try to emulate it.
|
||||
case "$1" in
|
||||
aclocal*)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified \`acinclude.m4' or \`${configure_ac}'. You might want
|
||||
to install the \`Automake' and \`Perl' packages. Grab them from
|
||||
any GNU archive site."
|
||||
touch aclocal.m4
|
||||
;;
|
||||
|
||||
autoconf)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified \`${configure_ac}'. You might want to install the
|
||||
\`Autoconf' and \`GNU m4' packages. Grab them from any GNU
|
||||
archive site."
|
||||
touch configure
|
||||
;;
|
||||
|
||||
autoheader)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified \`acconfig.h' or \`${configure_ac}'. You might want
|
||||
to install the \`Autoconf' and \`GNU m4' packages. Grab them
|
||||
from any GNU archive site."
|
||||
files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
|
||||
test -z "$files" && files="config.h"
|
||||
touch_files=
|
||||
for f in $files; do
|
||||
case "$f" in
|
||||
*:*) touch_files="$touch_files "`echo "$f" |
|
||||
sed -e 's/^[^:]*://' -e 's/:.*//'`;;
|
||||
*) touch_files="$touch_files $f.in";;
|
||||
esac
|
||||
done
|
||||
touch $touch_files
|
||||
;;
|
||||
|
||||
automake*)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
|
||||
You might want to install the \`Automake' and \`Perl' packages.
|
||||
Grab them from any GNU archive site."
|
||||
find . -type f -name Makefile.am -print |
|
||||
sed 's/\.am$/.in/' |
|
||||
while read f; do touch "$f"; done
|
||||
;;
|
||||
|
||||
autom4te)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is needed, but is $msg.
|
||||
You might have modified some files without having the
|
||||
proper tools for further handling them.
|
||||
You can get \`$1' as part of \`Autoconf' from any GNU
|
||||
archive site."
|
||||
|
||||
file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'`
|
||||
test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'`
|
||||
if test -f "$file"; then
|
||||
touch $file
|
||||
else
|
||||
test -z "$file" || exec >$file
|
||||
echo "#! /bin/sh"
|
||||
echo "# Created by GNU Automake missing as a replacement of"
|
||||
echo "# $ $@"
|
||||
echo "exit 0"
|
||||
chmod +x $file
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
|
||||
bison|yacc)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' $msg. You should only need it if
|
||||
you modified a \`.y' file. You may need the \`Bison' package
|
||||
in order for those modifications to take effect. You can get
|
||||
\`Bison' from any GNU archive site."
|
||||
rm -f y.tab.c y.tab.h
|
||||
if [ $# -ne 1 ]; then
|
||||
eval LASTARG="\${$#}"
|
||||
case "$LASTARG" in
|
||||
*.y)
|
||||
SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
|
||||
if [ -f "$SRCFILE" ]; then
|
||||
cp "$SRCFILE" y.tab.c
|
||||
fi
|
||||
SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
|
||||
if [ -f "$SRCFILE" ]; then
|
||||
cp "$SRCFILE" y.tab.h
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
if [ ! -f y.tab.h ]; then
|
||||
echo >y.tab.h
|
||||
fi
|
||||
if [ ! -f y.tab.c ]; then
|
||||
echo 'main() { return 0; }' >y.tab.c
|
||||
fi
|
||||
;;
|
||||
|
||||
lex|flex)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified a \`.l' file. You may need the \`Flex' package
|
||||
in order for those modifications to take effect. You can get
|
||||
\`Flex' from any GNU archive site."
|
||||
rm -f lex.yy.c
|
||||
if [ $# -ne 1 ]; then
|
||||
eval LASTARG="\${$#}"
|
||||
case "$LASTARG" in
|
||||
*.l)
|
||||
SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
|
||||
if [ -f "$SRCFILE" ]; then
|
||||
cp "$SRCFILE" lex.yy.c
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
if [ ! -f lex.yy.c ]; then
|
||||
echo 'main() { return 0; }' >lex.yy.c
|
||||
fi
|
||||
;;
|
||||
|
||||
help2man)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified a dependency of a manual page. You may need the
|
||||
\`Help2man' package in order for those modifications to take
|
||||
effect. You can get \`Help2man' from any GNU archive site."
|
||||
|
||||
file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
|
||||
if test -z "$file"; then
|
||||
file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'`
|
||||
fi
|
||||
if [ -f "$file" ]; then
|
||||
touch $file
|
||||
else
|
||||
test -z "$file" || exec >$file
|
||||
echo ".ab help2man is required to generate this page"
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
|
||||
makeinfo)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified a \`.texi' or \`.texinfo' file, or any other file
|
||||
indirectly affecting the aspect of the manual. The spurious
|
||||
call might also be the consequence of using a buggy \`make' (AIX,
|
||||
DU, IRIX). You might want to install the \`Texinfo' package or
|
||||
the \`GNU make' package. Grab either from any GNU archive site."
|
||||
# The file to touch is that specified with -o ...
|
||||
file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
|
||||
if test -z "$file"; then
|
||||
# ... or it is the one specified with @setfilename ...
|
||||
infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
|
||||
file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $infile`
|
||||
# ... or it is derived from the source name (dir/f.texi becomes f.info)
|
||||
test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
|
||||
fi
|
||||
# If the file does not exist, the user really needs makeinfo;
|
||||
# let's fail without touching anything.
|
||||
test -f $file || exit 1
|
||||
touch $file
|
||||
;;
|
||||
|
||||
tar)
|
||||
shift
|
||||
|
||||
# We have already tried tar in the generic part.
|
||||
# Look for gnutar/gtar before invocation to avoid ugly error
|
||||
# messages.
|
||||
if (gnutar --version > /dev/null 2>&1); then
|
||||
gnutar "$@" && exit 0
|
||||
fi
|
||||
if (gtar --version > /dev/null 2>&1); then
|
||||
gtar "$@" && exit 0
|
||||
fi
|
||||
firstarg="$1"
|
||||
if shift; then
|
||||
case "$firstarg" in
|
||||
*o*)
|
||||
firstarg=`echo "$firstarg" | sed s/o//`
|
||||
tar "$firstarg" "$@" && exit 0
|
||||
;;
|
||||
esac
|
||||
case "$firstarg" in
|
||||
*h*)
|
||||
firstarg=`echo "$firstarg" | sed s/h//`
|
||||
tar "$firstarg" "$@" && exit 0
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
echo 1>&2 "\
|
||||
WARNING: I can't seem to be able to run \`tar' with the given arguments.
|
||||
You may want to install GNU tar or Free paxutils, or check the
|
||||
command line arguments."
|
||||
exit 1
|
||||
;;
|
||||
|
||||
*)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is needed, and is $msg.
|
||||
You might have modified some files without having the
|
||||
proper tools for further handling them. Check the \`README' file,
|
||||
it often tells you about the needed prerequisites for installing
|
||||
this package. You may also peek at any GNU archive site, in case
|
||||
some other package would contain this missing \`$1' program."
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
|
||||
# Local variables:
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-end: "$"
|
||||
# End:
|
158
mkinstalldirs
158
mkinstalldirs
@ -1,158 +0,0 @@
|
||||
#! /bin/sh
|
||||
# mkinstalldirs --- make directory hierarchy
|
||||
|
||||
scriptversion=2005-06-29.22
|
||||
|
||||
# Original author: Noah Friedman <friedman@prep.ai.mit.edu>
|
||||
# Created: 1993-05-16
|
||||
# Public domain.
|
||||
#
|
||||
# This file is maintained in Automake, please report
|
||||
# bugs to <bug-automake@gnu.org> or send patches to
|
||||
# <automake-patches@gnu.org>.
|
||||
|
||||
errstatus=0
|
||||
dirmode=
|
||||
|
||||
usage="\
|
||||
Usage: mkinstalldirs [-h] [--help] [--version] [-m MODE] DIR ...
|
||||
|
||||
Create each directory DIR (with mode MODE, if specified), including all
|
||||
leading file name components.
|
||||
|
||||
Report bugs to <bug-automake@gnu.org>."
|
||||
|
||||
# process command line arguments
|
||||
while test $# -gt 0 ; do
|
||||
case $1 in
|
||||
-h | --help | --h*) # -h for help
|
||||
echo "$usage"
|
||||
exit $?
|
||||
;;
|
||||
-m) # -m PERM arg
|
||||
shift
|
||||
test $# -eq 0 && { echo "$usage" 1>&2; exit 1; }
|
||||
dirmode=$1
|
||||
shift
|
||||
;;
|
||||
--version)
|
||||
echo "$0 $scriptversion"
|
||||
exit $?
|
||||
;;
|
||||
--) # stop option processing
|
||||
shift
|
||||
break
|
||||
;;
|
||||
-*) # unknown option
|
||||
echo "$usage" 1>&2
|
||||
exit 1
|
||||
;;
|
||||
*) # first non-opt arg
|
||||
break
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
for file
|
||||
do
|
||||
if test -d "$file"; then
|
||||
shift
|
||||
else
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
case $# in
|
||||
0) exit 0 ;;
|
||||
esac
|
||||
|
||||
# Solaris 8's mkdir -p isn't thread-safe. If you mkdir -p a/b and
|
||||
# mkdir -p a/c at the same time, both will detect that a is missing,
|
||||
# one will create a, then the other will try to create a and die with
|
||||
# a "File exists" error. This is a problem when calling mkinstalldirs
|
||||
# from a parallel make. We use --version in the probe to restrict
|
||||
# ourselves to GNU mkdir, which is thread-safe.
|
||||
case $dirmode in
|
||||
'')
|
||||
if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
|
||||
echo "mkdir -p -- $*"
|
||||
exec mkdir -p -- "$@"
|
||||
else
|
||||
# On NextStep and OpenStep, the `mkdir' command does not
|
||||
# recognize any option. It will interpret all options as
|
||||
# directories to create, and then abort because `.' already
|
||||
# exists.
|
||||
test -d ./-p && rmdir ./-p
|
||||
test -d ./--version && rmdir ./--version
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
if mkdir -m "$dirmode" -p --version . >/dev/null 2>&1 &&
|
||||
test ! -d ./--version; then
|
||||
echo "mkdir -m $dirmode -p -- $*"
|
||||
exec mkdir -m "$dirmode" -p -- "$@"
|
||||
else
|
||||
# Clean up after NextStep and OpenStep mkdir.
|
||||
for d in ./-m ./-p ./--version "./$dirmode";
|
||||
do
|
||||
test -d $d && rmdir $d
|
||||
done
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
for file
|
||||
do
|
||||
case $file in
|
||||
/*) pathcomp=/ ;;
|
||||
*) pathcomp= ;;
|
||||
esac
|
||||
oIFS=$IFS
|
||||
IFS=/
|
||||
set fnord $file
|
||||
shift
|
||||
IFS=$oIFS
|
||||
|
||||
for d
|
||||
do
|
||||
test "x$d" = x && continue
|
||||
|
||||
pathcomp=$pathcomp$d
|
||||
case $pathcomp in
|
||||
-*) pathcomp=./$pathcomp ;;
|
||||
esac
|
||||
|
||||
if test ! -d "$pathcomp"; then
|
||||
echo "mkdir $pathcomp"
|
||||
|
||||
mkdir "$pathcomp" || lasterr=$?
|
||||
|
||||
if test ! -d "$pathcomp"; then
|
||||
errstatus=$lasterr
|
||||
else
|
||||
if test ! -z "$dirmode"; then
|
||||
echo "chmod $dirmode $pathcomp"
|
||||
lasterr=
|
||||
chmod "$dirmode" "$pathcomp" || lasterr=$?
|
||||
|
||||
if test ! -z "$lasterr"; then
|
||||
errstatus=$lasterr
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
pathcomp=$pathcomp/
|
||||
done
|
||||
done
|
||||
|
||||
exit $errstatus
|
||||
|
||||
# Local Variables:
|
||||
# mode: shell-script
|
||||
# sh-indentation: 2
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-end: "$"
|
||||
# End:
|
7
www/Makefile
Normal file
7
www/Makefile
Normal file
@ -0,0 +1,7 @@
|
||||
SUBDIRS = templates images ext4 css manager
|
||||
|
||||
all: ${SUBDIRS}
|
||||
|
||||
%:
|
||||
set -e && for i in ${SUBDIRS}; do ${MAKE} -C $$i $@; done
|
||||
|
@ -1,9 +0,0 @@
|
||||
include $(top_builddir)/common.mk
|
||||
|
||||
SUBDIRS = templates images ext4 css manager
|
||||
|
||||
install-data-hook:
|
||||
chown -R www-data:www-data ${DESTDIR}${WWW_BASEDIR}
|
||||
|
||||
CLEANFILES=*~
|
||||
|
15
www/css/Makefile
Normal file
15
www/css/Makefile
Normal file
@ -0,0 +1,15 @@
|
||||
include ../../defines.mk
|
||||
|
||||
all:
|
||||
|
||||
.PHONY: install
|
||||
install: ext-pve.css
|
||||
install -d ${WWWCSSDIR}
|
||||
install -m 0644 -o www-data -g www-data $< ${WWWCSSDIR}
|
||||
|
||||
.PHONY: distclean
|
||||
distclean: clean
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
rm -rf *~
|
@ -1,13 +0,0 @@
|
||||
include $(top_builddir)/common.mk
|
||||
|
||||
|
||||
css_DATA = \
|
||||
ext-pve.css
|
||||
|
||||
cssdir = ${WWW_CSSDIR}
|
||||
|
||||
install-data-hook:
|
||||
chown -R www-data:www-data ${DESTDIR}/${cssdir}
|
||||
|
||||
CLEANFILES= *~
|
||||
|
29
www/images/Makefile
Normal file
29
www/images/Makefile
Normal file
@ -0,0 +1,29 @@
|
||||
include ../../defines.mk
|
||||
|
||||
GNOME_IMAGES = \
|
||||
display.png \
|
||||
keyboard.png \
|
||||
cdrom.png \
|
||||
network.png \
|
||||
drive-harddisk.png \
|
||||
network-server.png \
|
||||
computer.png
|
||||
|
||||
IMAGES = ${GNOME_IMAGES} \
|
||||
computer-on.png \
|
||||
memory.png \
|
||||
processor.png \
|
||||
proxmox_logo.png \
|
||||
blank.gif
|
||||
|
||||
.PHONY: install
|
||||
install: ${IMAGES}
|
||||
install -d ${WWWIMAGEDIR}
|
||||
install -m 0644 -o www-data -g www-data ${IMAGES} ${WWWIMAGEDIR}
|
||||
|
||||
.PHONY: distclean
|
||||
distclean: clean
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
rm -rf *~
|
@ -1,25 +0,0 @@
|
||||
include $(top_builddir)/common.mk
|
||||
|
||||
GNOME_IMAGES = \
|
||||
display.png \
|
||||
keyboard.png \
|
||||
cdrom.png \
|
||||
network.png \
|
||||
drive-harddisk.png \
|
||||
network-server.png \
|
||||
computer.png
|
||||
|
||||
images_DATA = ${GNOME_IMAGES} \
|
||||
computer-on.png \
|
||||
memory.png \
|
||||
processor.png \
|
||||
proxmox_logo.png \
|
||||
blank.gif
|
||||
|
||||
imagesdir = ${WWW_IMAGEDIR}
|
||||
|
||||
install-data-hook:
|
||||
chown -R www-data:www-data ${DESTDIR}/${imagesdir}
|
||||
|
||||
CLEANFILES=*~
|
||||
|
@ -1,4 +1,4 @@
|
||||
include $(top_builddir)/common.mk
|
||||
include ../../defines.mk
|
||||
|
||||
JSSRC= \
|
||||
Utils.js \
|
||||
@ -107,24 +107,24 @@ pvemanagerlib.js: ${JSSRC}
|
||||
cat ${JSSRC} >$@.tmp
|
||||
mv $@.tmp $@
|
||||
|
||||
pvelib_DATA = pvemanagerlib.js
|
||||
pvelibdir = ${WWW_EXTDIR}
|
||||
all: pvemanagerlib.js
|
||||
|
||||
privatedir = ${WWW_BASEDIR}
|
||||
private_SCRIPTS = \
|
||||
startup.pl
|
||||
.PHONY: install
|
||||
install: pvemanagerlib.js startup.pl index.pl
|
||||
install -d ${WWWBASEDIR}
|
||||
install -m 0755 -o www-data -g www-data startup.pl ${WWWBASEDIR}
|
||||
install -d ${WWWROOTDIR}
|
||||
install -m 0755 -o www-data -g www-data index.pl ${WWWROOTDIR}
|
||||
install -d ${WWWEXT4DIR}
|
||||
install -m 0644 -o www-data -g www-data pvemanagerlib.js ${WWWEXT4DIR}
|
||||
|
||||
managerdir = ${WWW_ROOTDIR}
|
||||
manager_SCRIPTS = \
|
||||
index.pl
|
||||
.PHONY: distclean
|
||||
distclean: clean
|
||||
|
||||
install-data-hook:
|
||||
chown -R www-data:www-data ${DESTDIR}/${privatedir}
|
||||
chown -R www-data:www-data ${DESTDIR}/${managerdir}
|
||||
chown -R www-data:www-data ${DESTDIR}/${pvelibdir}
|
||||
|
||||
clean-local:
|
||||
.PHONY: clean
|
||||
clean:
|
||||
find . -name '*~' -exec rm {} ';'
|
||||
-rm -rf pvemanagerlib.js
|
||||
rm -rf pvemanagerlib.js
|
||||
|
||||
|
||||
|
22
www/templates/Makefile
Normal file
22
www/templates/Makefile
Normal file
@ -0,0 +1,22 @@
|
||||
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 $@
|
||||
|
||||
.PHONY: install
|
||||
install: ve-pve.auto.conf-sample 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/
|
||||
|
||||
.PHONY: distclean
|
||||
distclean: clean
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
rm -rf *~ ve-pve.auto.conf-sample ve-pve.auto.conf-sample.tmp
|
@ -1,20 +0,0 @@
|
||||
include $(top_builddir)/common.mk
|
||||
|
||||
ve-pve.auto.conf-sample: generate.pl
|
||||
./generate.pl 256 > $@.tmp
|
||||
vzcfgvalidate $@.tmp
|
||||
mv $@.tmp $@
|
||||
|
||||
|
||||
apache_DATA = $(BUILDDATA)
|
||||
|
||||
apachedir = /etc/apache2/sites-available/
|
||||
|
||||
vesample_DATA = ve-pve.auto.conf-sample
|
||||
|
||||
vesampledir = /etc/vz/conf
|
||||
|
||||
BUILDDATA = pve.conf pve-redirect.conf
|
||||
|
||||
CLEANFILES=*~ ve-pve.auto.conf-sample.tmp
|
||||
|
@ -1,146 +0,0 @@
|
||||
<IfModule mpm_prefork_module>
|
||||
StartServers 2
|
||||
MinSpareServers 1
|
||||
MaxSpareServers 2
|
||||
MaxClients 50
|
||||
MaxRequestsPerChild 30
|
||||
</IfModule>
|
||||
|
||||
ServerName localhost
|
||||
ServerSignature Off
|
||||
ServerTokens Prod
|
||||
ServerAdmin root
|
||||
AddDefaultCharset On
|
||||
|
||||
# Hint: Ajax use KeepAlive, which in effect disables MaxRequestsPerChild,
|
||||
# so we need to disable KeepAlive to prevent exhaustive memory usage, or
|
||||
# at least make sure that periodic updaters interval > KeepAliveTimeout
|
||||
# or maybe we should set "MaxKeepAliveRequests 20"
|
||||
|
||||
KeepAlive Off
|
||||
|
||||
DocumentRoot @WWW_ROOTDIR@
|
||||
<Directory />
|
||||
Options FollowSymLinks
|
||||
AllowOverride None
|
||||
</Directory>
|
||||
|
||||
<Directory @WWW_ROOTDIR@>
|
||||
Options FollowSymLinks MultiViews
|
||||
AllowOverride None
|
||||
Order allow,deny
|
||||
allow from all
|
||||
</Directory>
|
||||
|
||||
ErrorLog /var/log/apache2/error.log
|
||||
|
||||
LogLevel warn
|
||||
|
||||
# do not log access to our ajax services
|
||||
SetEnvIf Request_URI "^/ws/" dontlog
|
||||
|
||||
CustomLog /var/log/apache2/access.log combined env=!dontlog
|
||||
|
||||
Alias /images/ @WWW_IMAGEDIR@/
|
||||
Alias /css/ @WWW_CSSDIR@/
|
||||
Alias /ext/ @WWW_EXTDIR@/
|
||||
Alias /javascript/ /usr/share/javascript/
|
||||
Alias /vncterm/ /usr/share/vncterm/
|
||||
|
||||
# avoid authentication when accessing favicon
|
||||
Alias /favicon.ico @WWW_IMAGEDIR@/favicon.ico
|
||||
|
||||
PerlModule Embperl
|
||||
EMBPERL_SESSION_ARGS "config=DB_File Lock=Semaphore"
|
||||
|
||||
AddType text/html .epl
|
||||
|
||||
PerlRequire @WWW_ROOTDIR@/startup.pl
|
||||
|
||||
PerlSetVar PVESatisfy any
|
||||
PerlSetVar PVEPath /
|
||||
PerlSetVar PVELoginScript /login.pl
|
||||
|
||||
PerlTransHandler PVE::URLRewrite
|
||||
|
||||
Alias /nrd/ /__no_real_dir__/
|
||||
|
||||
<Directory "@WWW_ROOTDIR@">
|
||||
AuthType PVE::AuthCookieHandler
|
||||
AuthName PVE
|
||||
PerlSetVar PVECookieName PVEAuthCookie
|
||||
#PerlSetVar AuthCookieDebug 5
|
||||
|
||||
PerlAuthenHandler PVE::AuthCookieHandler->authenticate
|
||||
PerlAuthzHandler PVE::AuthCookieHandler->authorize
|
||||
|
||||
require group root
|
||||
|
||||
DirectoryIndex index.htm index.pl
|
||||
|
||||
<FilesMatch ".*\.htm$">
|
||||
EMBPERL_APPNAME PVE
|
||||
EMBPERL_SYNTAX EmbperlBlocks
|
||||
EMBPERL_OBJECT_BASE base.epl
|
||||
EMBPERL_INPUT_ESCMODE 0
|
||||
EMBPERL_ESCMODE 0
|
||||
SetHandler perl-script
|
||||
PerlHandler Embperl::Object
|
||||
Options ExecCGI
|
||||
</FilesMatch>
|
||||
<FilesMatch ".*\.epl$">
|
||||
Order allow,deny
|
||||
Deny From all
|
||||
</FilesMatch>
|
||||
<FilesMatch ".*\.pl$">
|
||||
SetHandler perl-script
|
||||
PerlHandler ModPerl::Registry
|
||||
Options +ExecCGI
|
||||
</FilesMatch>
|
||||
|
||||
</Directory>
|
||||
|
||||
<Location /nrd/LOGIN>
|
||||
AuthType PVE::AuthCookieHandler
|
||||
AuthName PVE
|
||||
PerlSetVar PVECookieName PVEAuthCookie
|
||||
#PerlSetVar AuthCookieDebug 5
|
||||
SetHandler perl-script
|
||||
PerlHandler PVE::AuthCookieHandler->login
|
||||
</Location>
|
||||
|
||||
<Location /ws/>
|
||||
SetHandler perl-script
|
||||
PerlHandler $PVE::HTMLServices::Obj->handler
|
||||
</Location>
|
||||
|
||||
<VirtualHost *:443>
|
||||
|
||||
SSLEngine on
|
||||
SSLProtocol all -SSLv2
|
||||
SSLCertificateFile @PROXMOX_ETC@/pve-ssl.pem
|
||||
SSLCertificateKeyFile @PROXMOX_ETC@/pve-ssl.key
|
||||
|
||||
RewriteEngine on
|
||||
RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
|
||||
RewriteRule .* - [F]
|
||||
|
||||
</VirtualHost>
|
||||
|
||||
<VirtualHost *:80>
|
||||
#RewriteLog "/root/rewrite.log"
|
||||
#RewriteLogLevel 10
|
||||
RewriteEngine on
|
||||
RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
|
||||
RewriteRule .* - [F]
|
||||
RewriteCond %{REQUEST_URI} !^/nrd/
|
||||
RewriteCond %{REQUEST_URI} !^/images/
|
||||
RewriteCond %{REQUEST_URI} !^/css/
|
||||
RewriteCond %{REQUEST_URI} !^/ext/
|
||||
RewriteCond %{REQUEST_URI} !^/javascript/
|
||||
RewriteCond %{REQUEST_URI} !^/vncterm/
|
||||
RewriteCond %{REQUEST_URI} !^/.*\.js$
|
||||
RewriteCond %{REQUEST_URI} !^/login.pl$
|
||||
RewriteRule ^/(.*) https://%{HTTP_HOST}/$1 [L,R]
|
||||
</VirtualHost>
|
||||
|
@ -10,8 +10,8 @@
|
||||
<VirtualHost *:443>
|
||||
SSLEngine on
|
||||
SSLProtocol all -SSLv2
|
||||
SSLCertificateFile @PROXMOX_ETC@/local/pve-ssl.pem
|
||||
SSLCertificateKeyFile @PROXMOX_ETC@/local/pve-ssl.key
|
||||
SSLCertificateFile /etc/pve/local/pve-ssl.pem
|
||||
SSLCertificateKeyFile /etc/pve/local/pve-ssl.key
|
||||
|
||||
RewriteEngine on
|
||||
RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
|
@ -29,33 +29,35 @@ Listen 8006
|
||||
<VirtualHost *:8006>
|
||||
SSLEngine on
|
||||
SSLProtocol all -SSLv2
|
||||
SSLCertificateFile @PROXMOX_ETC@/local/pve-ssl.pem
|
||||
SSLCertificateKeyFile @PROXMOX_ETC@/local/pve-ssl.key
|
||||
SSLCertificateFile /etc/pve/local/pve-ssl.pem
|
||||
SSLCertificateKeyFile /etc/pve/local/pve-ssl.key
|
||||
|
||||
RewriteEngine on
|
||||
RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
|
||||
RewriteRule .* - [F]
|
||||
|
||||
DocumentRoot @WWW_ROOTDIR@
|
||||
DocumentRoot /usr/share/pve-manager/root
|
||||
<Directory />
|
||||
Options FollowSymLinks
|
||||
AllowOverride None
|
||||
</Directory>
|
||||
|
||||
<Directory @WWW_ROOTDIR@>
|
||||
<Directory /usr/share/pve-manager/root>
|
||||
Options FollowSymLinks MultiViews
|
||||
AllowOverride None
|
||||
Order allow,deny
|
||||
allow from all
|
||||
</Directory>
|
||||
|
||||
Alias /pve2/ @WWW_BASEDIR@/
|
||||
Alias /pve2/css/ /usr/share/pve-manager/css/
|
||||
Alias /pve2/ext4 /usr/share/pve-manager/ext4/
|
||||
Alias /pve2/images/ /usr/share/pve-manager/images/
|
||||
Alias /vncterm/ /usr/share/vncterm/
|
||||
|
||||
# avoid authentication when accessing favicon
|
||||
Alias /favicon.ico @WWW_IMAGEDIR@/favicon.ico
|
||||
Alias /favicon.ico /usr/share/pve-manager/images/favicon.ico
|
||||
|
||||
PerlRequire @WWW_BASEDIR@/startup.pl
|
||||
PerlRequire /usr/share/pve-manager/startup.pl
|
||||
|
||||
<Location /index.pl>
|
||||
SetHandler perl-script
|
@ -1,39 +0,0 @@
|
||||
# PVE default config for 256MB RAM
|
||||
|
||||
ONBOOT="no"
|
||||
|
||||
# Primary parameters
|
||||
NUMPROC="1024:1024"
|
||||
NUMTCPSOCK="9223372036854775807:9223372036854775807"
|
||||
NUMOTHERSOCK="9223372036854775807:9223372036854775807"
|
||||
VMGUARPAGES="65536:9223372036854775807"
|
||||
|
||||
# Secondary parameters
|
||||
KMEMSIZE="9223372036854775807:9223372036854775807"
|
||||
OOMGUARPAGES="65536:9223372036854775807"
|
||||
PRIVVMPAGES="65536:72089"
|
||||
TCPSNDBUF="9223372036854775807:9223372036854775807"
|
||||
TCPRCVBUF="9223372036854775807:9223372036854775807"
|
||||
OTHERSOCKBUF="9223372036854775807:9223372036854775807"
|
||||
DGRAMRCVBUF="9223372036854775807:9223372036854775807"
|
||||
|
||||
# Auxiliary parameters
|
||||
NUMFILE="9223372036854775807:9223372036854775807"
|
||||
NUMFLOCK="9223372036854775807:9223372036854775807"
|
||||
NUMPTY="255:255"
|
||||
NUMSIGINFO="1024:1024"
|
||||
DCACHESIZE="9223372036854775807:9223372036854775807"
|
||||
LOCKEDPAGES="9223372036854775807:9223372036854775807"
|
||||
SHMPAGES="9223372036854775807:9223372036854775807"
|
||||
NUMIPTENT="9223372036854775807:9223372036854775807"
|
||||
PHYSPAGES="0:9223372036854775807"
|
||||
|
||||
# Disk quota parameters
|
||||
DISKSPACE="9223372036854775807:9223372036854775807"
|
||||
DISKINODES="9223372036854775807:9223372036854775807"
|
||||
QUOTATIME="0"
|
||||
QUOTAUGIDLIMIT="0"
|
||||
|
||||
# CPU fair sheduler parameter
|
||||
CPUUNITS="1000"
|
||||
CPUS="1"
|
Loading…
Reference in New Issue
Block a user