From 4558cb6eb65ca4fc035c172880773101f1ef352d Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Thu, 12 Nov 2020 11:49:01 +0100 Subject: [PATCH] pbs: autogen encryption key: bubble up error message Signed-off-by: Thomas Lamprecht --- PVE/Storage/PBSPlugin.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/PVE/Storage/PBSPlugin.pm b/PVE/Storage/PBSPlugin.pm index 6403e2e..e4c431e 100644 --- a/PVE/Storage/PBSPlugin.pm +++ b/PVE/Storage/PBSPlugin.pm @@ -363,7 +363,9 @@ sub prune_backups { my $autogen_encryption_key = sub { my ($scfg, $storeid) = @_; my $encfile = pbs_encryption_key_file_name($scfg, $storeid); - run_command(['proxmox-backup-client', 'key', 'create', '--kdf', 'none', $encfile]); + my $cmd = ['proxmox-backup-client', 'key', 'create', '--kdf', 'none', $encfile]; + run_command($cmd, errmsg => 'failed to create encryption key'); + return PVE::Tools::file_get_contents($encfile); }; sub on_add_hook {