[pve-devel] r5044 - pve-common/trunk
svn-commits at proxmox.com
svn-commits at proxmox.com
Tue Aug 24 13:11:35 CEST 2010
Author: dietmar
Date: 2010-08-24 11:11:35 +0000 (Tue, 24 Aug 2010)
New Revision: 5044
Modified:
pve-common/trunk/RPCEnvironment.pm
Log:
Modified: pve-common/trunk/RPCEnvironment.pm
===================================================================
--- pve-common/trunk/RPCEnvironment.pm 2010-08-24 11:05:14 UTC (rev 5043)
+++ pve-common/trunk/RPCEnvironment.pm 2010-08-24 11:11:35 UTC (rev 5044)
@@ -7,14 +7,21 @@
our $pve_env;
sub init {
- my ($class) = @_;
+ my ($class, $type) = @_;
$class = ref($class) || $class;
die "already initialized" if $pve_env;
+ die "unknown environment type" if !$type || $type !~ m/^(cli|pub|priv)$/;
+
+ # environment types
+ # cli ... command started fron command line
+ # pub ... access from public server (apache)
+ # priv ... access from private server (pvedaemon)
+
my $self = {
-
+ type => $type,
};
bless $self, $class;
More information about the pve-devel
mailing list