[pve-devel] applied: [PATCH pve-storage] add setup_environment hook to CLIHandler class
Dietmar Maurer
dietmar at proxmox.com
Thu Jan 12 14:04:18 CET 2017
and use run_cli_handler instead of depreciated run_cli.
Signed-off-by: Dietmar Maurer <dietmar at proxmox.com>
---
PVE/CLI/pvesm.pm | 4 ++++
pvesm | 2 +-
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/PVE/CLI/pvesm.pm b/PVE/CLI/pvesm.pm
index e3b4570..3767810 100755
--- a/PVE/CLI/pvesm.pm
+++ b/PVE/CLI/pvesm.pm
@@ -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 c5c2b19..ece9be8 100755
--- 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();
--
2.1.4
More information about the pve-devel
mailing list