]> git.proxmox.com Git - qemu-server.git/commitdiff
add setup_environment hook to CLIHandler classes
authorDietmar Maurer <dietmar@proxmox.com>
Thu, 12 Jan 2017 13:10:24 +0000 (14:10 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Thu, 12 Jan 2017 13:10:24 +0000 (14:10 +0100)
PVE/CLI/qm.pm
PVE/CLI/qmrestore.pm

index 4789ee15d2d71e04128ab15ff461e26a05f8883e..44439ddb43fa023af5a18dde9f4c76b957af26a3 100755 (executable)
@@ -34,6 +34,10 @@ my $upid_exit = sub {
 
 my $nodename = PVE::INotify::nodename();
 
+sub setup_environment {
+    PVE::RPCEnvironment->setup_default_cli_env();
+}
+
 sub run_vnc_proxy {
     my ($path) = @_;
 
index 7214c2d62987a339dab47ecc6f63cbc812f7316b..17018d22694a9b064bb6ca2b5ac99d11c205b51b 100755 (executable)
@@ -14,6 +14,10 @@ use PVE::API2::Qemu;
 
 use base qw(PVE::CLIHandler);
 
+sub setup_environment {
+    PVE::RPCEnvironment->setup_default_cli_env();
+}
+
 __PACKAGE__->register_method({
     name => 'qmrestore', 
     path => 'qmrestore',