5
0
mirror of git://git.proxmox.com/git/pve-storage.git synced 2025-01-03 01:18:01 +03:00

generate correct manual page and .pod

This commit is contained in:
Dietmar Maurer 2011-10-20 08:20:37 +02:00
parent 3319f21ce0
commit 630f436a63
3 changed files with 96 additions and 90 deletions

2
.gitignore vendored
View File

@ -1 +1,3 @@
*.deb *.deb
*.1.pod
*.1.gz

View File

@ -9,7 +9,8 @@ PREFIX=/usr
BINDIR=${PREFIX}/bin BINDIR=${PREFIX}/bin
SBINDIR=${PREFIX}/sbin SBINDIR=${PREFIX}/sbin
MANDIR=${PREFIX}/share/man MANDIR=${PREFIX}/share/man
DOCDIR=${PREFIX}/share/doc DOCDIR=${PREFIX}/share/doc/${PACKAGE}
PODDIR=${DOCDIR}/pod
MAN1DIR=${MANDIR}/man1/ MAN1DIR=${MANDIR}/man1/
export PERLDIR=${PREFIX}/share/perl5 export PERLDIR=${PREFIX}/share/perl5
@ -24,13 +25,22 @@ all: ${DEB}
dinstall: deb dinstall: deb
dpkg -i ${DEB} dpkg -i ${DEB}
%.1.gz: %.1.pod
rm -f $@
cat $<|pod2man -n $* -s 1 -r ${VERSION} -c "Proxmox Documentation"|gzip -c9 >$@
pvesm.1.pod: pvesm PVE/Storage.pm
perl -I. ./pvesm printmanpod >$@
.PHONY: install .PHONY: install
install: install: pvesm.1.pod pvesm.1.gz
install -d ${DESTDIR}${SBINDIR} install -d ${DESTDIR}${SBINDIR}
install -m 0755 pvesm ${DESTDIR}${SBINDIR} install -m 0755 pvesm ${DESTDIR}${SBINDIR}
make -C PVE install make -C PVE install
install -d ${DESTDIR}/usr/share/man/man1 install -d ${DESTDIR}/usr/share/man/man1
pod2man -n pvesm -s 1 -r "proxmox 1.0" -c "Proxmox Documentation" <pvesm | gzip -9 > ${DESTDIR}/usr/share/man/man1/pvesm.1.gz install -d ${DESTDIR}${PODDIR}
install -m 0644 pvesm.1.gz ${DESTDIR}/usr/share/man/man1/
install -m 0644 pvesm.1.pod ${DESTDIR}/${PODDIR}
.PHONY: deb ${DEB} .PHONY: deb ${DEB}
deb ${DEB}: deb ${DEB}:
@ -40,9 +50,9 @@ deb ${DEB}:
perl -I. ./pvesm verifyapi perl -I. ./pvesm verifyapi
install -d -m 0755 debian/DEBIAN install -d -m 0755 debian/DEBIAN
sed -e s/@@VERSION@@/${VERSION}/ -e s/@@PKGRELEASE@@/${PKGREL}/ -e s/@@ARCH@@/${ARCH}/ <control.in >debian/DEBIAN/control sed -e s/@@VERSION@@/${VERSION}/ -e s/@@PKGRELEASE@@/${PKGREL}/ -e s/@@ARCH@@/${ARCH}/ <control.in >debian/DEBIAN/control
install -D -m 0644 copyright debian/${DOCDIR}/${PACKAGE}/copyright install -D -m 0644 copyright debian/${DOCDIR}/copyright
install -m 0644 changelog.Debian debian/${DOCDIR}/${PACKAGE}/ install -m 0644 changelog.Debian debian/${DOCDIR}/
gzip -9 debian/${DOCDIR}/${PACKAGE}/changelog.Debian gzip -9 debian/${DOCDIR}/changelog.Debian
dpkg-deb --build debian dpkg-deb --build debian
mv debian.deb ${DEB} mv debian.deb ${DEB}
rm -rf debian rm -rf debian
@ -50,7 +60,7 @@ deb ${DEB}:
.PHONY: clean .PHONY: clean
clean: clean:
rm -rf debian *.deb ${PACKAGE}-*.tar.gz dist rm -rf debian *.deb ${PACKAGE}-*.tar.gz dist *.1.pod *.1.gz
find . -name '*~' -exec rm {} ';' find . -name '*~' -exec rm {} ';'
.PHONY: distclean .PHONY: distclean

128
pvesm
View File

@ -168,12 +168,7 @@ my $cmddef = {
my $cmd = shift; my $cmd = shift;
if ($cmd && $cmd eq 'verifyapi') { PVE::CLIHandler::handle_cmd($cmddef, "pvesm", $cmd, \@ARGV, undef, $0);
PVE::RESTHandler::validate_method_schemas();
exit 0;
}
PVE::CLIHandler::handle_cmd($cmddef, "pvesm", $cmd, \@ARGV);
exit 0; exit 0;
@ -185,67 +180,7 @@ pvesm - PVE Storage Manager
=head1 SYNOPSIS =head1 SYNOPSIS
pvesm <COMMAND> [OPTIONS] =include synopsis
# scan iscsi host for available targets
pvesm scan iscsi <HOST[:PORT]>
# scan nfs server for available exports
pvesm scan nfs <HOST>
# add storage pools
pvesm add <STORAGE_ID> <TYPE> <OPTIONS>
pvesm add <STORAGE_ID> dir --path <PATH>
pvesm add <STORAGE_ID> nfs --path <PATH> --server <SERVER> --export <EXPORT>
pvesm add <STORAGE_ID> lvm --vgname <VGNAME>
pvesm add <STORAGE_ID> iscsi --portal <HOST[:PORT]> --target <TARGET>
# disable storage pools
pvesm set <STORAGE_ID> --disable 1
# enable storage pools
pvesm set <STORAGE_ID> --disable 0
# change/set storage options
pvesm set <STORAGE_ID> <OPTIONS>
pvesm set <STORAGE_ID> --shared 1
pvesm set local --format qcow2
pvesm set <STORAGE_ID> --content iso
# remove storage pools - does not delete any data
pvesm remove <STORAGE_ID>
# add single devices??
# alloc volumes
pvesm alloc <STORAGE_ID> <VMID> <name> <size> [--format <raw|qcow2>]
# alloc 4G volume in local storage - use auto generated name
pvesm alloc local <VMID> '' 4G
# free volumes (warning: destroy/deletes all volume data)
pvesm free <VOLUME_ID>
# list storage status
pvesm status
# list storage contents
pvesm list <STORAGE_ID> [--vmid <VMID>]
# list volumes allocated by VMID
pvesm list <STORAGE_ID> --vmid <VMID>
# list iso images
pvesm list <STORAGE_ID> --iso
# list openvz templates
pvesm list <STORAGE_ID> --vztmpl
# show filesystem path for a volume
pvesm path <VOLUME_ID>
# import disks ??
=head1 DESCRIPTION =head1 DESCRIPTION
@ -276,3 +211,62 @@ To get the filesystem path for a <VOLUME_ID> use:
pvesm path <VOLUME_ID> pvesm path <VOLUME_ID>
=head1 EXAMPLES
# scan iscsi host for available targets
pvesm scan iscsi <HOST[:PORT]>
# scan nfs server for available exports
pvesm scan nfs <HOST>
# add storage pools
pvesm add <STORAGE_ID> <TYPE> <OPTIONS>
pvesm add <STORAGE_ID> dir --path <PATH>
pvesm add <STORAGE_ID> nfs --path <PATH> --server <SERVER> --export <EXPORT>
pvesm add <STORAGE_ID> lvm --vgname <VGNAME>
pvesm add <STORAGE_ID> iscsi --portal <HOST[:PORT]> --target <TARGET>
# disable storage pools
pvesm set <STORAGE_ID> --disable 1
# enable storage pools
pvesm set <STORAGE_ID> --disable 0
# change/set storage options
pvesm set <STORAGE_ID> <OPTIONS>
pvesm set <STORAGE_ID> --shared 1
pvesm set local --format qcow2
pvesm set <STORAGE_ID> --content iso
# remove storage pools - does not delete any data
pvesm remove <STORAGE_ID>
# alloc volumes
pvesm alloc <STORAGE_ID> <VMID> <name> <size> [--format <raw|qcow2>]
# alloc 4G volume in local storage - use auto generated name
pvesm alloc local <VMID> '' 4G
# free volumes (warning: destroy/deletes all volume data)
pvesm free <VOLUME_ID>
# list storage status
pvesm status
# list storage contents
pvesm list <STORAGE_ID> [--vmid <VMID>]
# list volumes allocated by VMID
pvesm list <STORAGE_ID> --vmid <VMID>
# list iso images
pvesm list <STORAGE_ID> --iso
# list openvz templates
pvesm list <STORAGE_ID> --vztmpl
# show filesystem path for a volume
pvesm path <VOLUME_ID>
=include pve_copyright