]> git.proxmox.com Git - pve-common.git/commitdiff
pbs: autogen key: adapt recent changes in storage module
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 17 Nov 2020 08:12:31 +0000 (09:12 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 17 Nov 2020 08:12:31 +0000 (09:12 +0100)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
src/PVE/PBSClient.pm

index 83e0e2e2ccb4a4c70f073431d717f2c420cbe3c3..6c47988e6fc40d744017d77441cd6eaf4afb1517 100644 (file)
@@ -194,7 +194,11 @@ my sub run_client_cmd {
 sub autogen_encryption_key {
     my ($self) = @_;
     my $encfile = $self->encryption_key_file_name();
 sub autogen_encryption_key {
     my ($self) = @_;
     my $encfile = $self->encryption_key_file_name();
-    run_command(['proxmox-backup-client', 'key', 'create', '--kdf', 'none', $encfile]);
+    run_command(
+        ['proxmox-backup-client', 'key', 'create', '--kdf', 'none', $encfile],
+        errmsg => 'failed to create encryption key'
+    );
+    return file_get_contents($encfile);
 };
 
 sub get_snapshots {
 };
 
 sub get_snapshots {