]> git.proxmox.com Git - pve-common.git/blobdiff - src/PVE/PBSClient.pm
pbs: autogen key: adapt recent changes in storage module
[pve-common.git] / 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();
-    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 {