]> git.proxmox.com Git - pve-storage.git/commitdiff
add setup_environment hook to CLIHandler class
authorDietmar Maurer <dietmar@proxmox.com>
Thu, 12 Jan 2017 12:27:43 +0000 (13:27 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Thu, 12 Jan 2017 12:27:43 +0000 (13:27 +0100)
and use run_cli_handler instead of depreciated run_cli.

PVE/CLI/pvesm.pm
pvesm

index e3b4570ab0ae030b418f8584277a6cb940ac9892..376781059e32fb57ed6c85b74c09a67a23b0b7ce 100755 (executable)
@@ -23,6 +23,10 @@ use base qw(PVE::CLIHandler);
 
 my $nodename = PVE::INotify::nodename();
 
+sub setup_environment {
+    PVE::RPCEnvironment->setup_default_cli_env();
+}
+
 __PACKAGE__->register_method ({
     name => 'path',
     path => 'path',
diff --git a/pvesm b/pvesm
index c5c2b193189b8863f05303495f5fac3cb0ac9da2..ece9be8fd03ac68cbdcba90e9ee4759a6a1502ec 100755 (executable)
--- a/pvesm
+++ b/pvesm
@@ -5,4 +5,4 @@ use warnings;
 
 use PVE::CLI::pvesm;
 
-PVE::CLI::pvesm->run_cli();
+PVE::CLI::pvesm->run_cli_handler();