From f984732e0ea14039926d6464f38014ca8fb87045 Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Thu, 12 Jan 2017 13:27:43 +0100 Subject: [PATCH] add setup_environment hook to CLIHandler class and use run_cli_handler instead of depreciated run_cli. --- 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();