[pve-devel] [PATCH common] run_cli_handler: do not init RPCEnv on pvecm
Thomas Lamprecht
t.lamprecht at proxmox.com
Tue May 24 14:57:56 CEST 2016
As pve-access-control needs pve-cluster, pve-cluster mustn't depend
on pve-access-control. This was the case with pvecm which is a child
of CLIHandler and so inited RPCEnv when calling run_cli_handler.
We do not need RPCEnv for pvecm.pm so do not init RPCEnv in
run_cli_handler for it and drop its use clause in pvecm.pm to fix
this issue. Else we have a implicit build dependency.
Signed-off-by: Thomas Lamprecht <t.lamprecht at proxmox.com>
---
src/PVE/CLIHandler.pm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/PVE/CLIHandler.pm b/src/PVE/CLIHandler.pm
index c448a80..93ab1a6 100644
--- a/src/PVE/CLIHandler.pm
+++ b/src/PVE/CLIHandler.pm
@@ -481,7 +481,7 @@ sub run_cli_handler {
initlog($exename);
- if ($class !~ m/^PVE::Service::/) {
+ if ($class !~ m/^PVE::Service::/ && $class ne 'PVE::CLI::pvecm') {
die "please run as root\n" if $> != 0;
PVE::INotify::inotify_init() if !$no_init;
--
2.1.4
More information about the pve-devel
mailing list