]> git.proxmox.com Git - pve-storage.git/blobdiff - PVE/Storage.pm
Add write_config, drop cfs_read_file
[pve-storage.git] / PVE / Storage.pm
index 415301ace7788d7eedaa7c63fdf49e7d91060a2e..9d8c468d8a3d2a3eaa8334f3fe3e3e30d162afb6 100755 (executable)
@@ -13,7 +13,7 @@ use Cwd 'abs_path';
 use Socket;
 
 use PVE::Tools qw(run_command file_read_firstline $IPV6RE);
-use PVE::Cluster qw(cfs_read_file cfs_lock_file);
+use PVE::Cluster qw(cfs_read_file cfs_write_file cfs_lock_file);
 use PVE::Exception qw(raise_param_exc);
 use PVE::JSONSchema;
 use PVE::INotify;
@@ -56,6 +56,12 @@ sub config {
     return cfs_read_file("storage.cfg");
 }
 
+sub write_config {
+    my ($cfg) = @_;
+
+    cfs_write_file('storage.cfg', $cfg);
+}
+
 sub lock_storage_config {
     my ($code, $errmsg) = @_;