[pve-devel] [PATCH ha-manager 6/7] HA/Config: add write_fence_config helper

Thomas Lamprecht t.lamprecht at proxmox.com
Thu Jul 14 14:41:52 CEST 2016


We have already an helper for reading, so just add one for writingr,
it is helpful for the HW Fence API integration.

Signed-off-by: Thomas Lamprecht <t.lamprecht at proxmox.com>
---
 src/PVE/HA/Config.pm | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/PVE/HA/Config.pm b/src/PVE/HA/Config.pm
index a206561..887daf2 100644
--- a/src/PVE/HA/Config.pm
+++ b/src/PVE/HA/Config.pm
@@ -130,6 +130,12 @@ sub read_fence_config {
     cfs_read_file($ha_fence_config);
 }
 
+sub write_fence_config {
+    my ($cfg) = @_;
+
+    cfs_write_file($ha_fence_config, $cfg);
+}
+
 sub lock_ha_domain {
     my ($code, $errmsg) = @_;
 
-- 
2.1.4




More information about the pve-devel mailing list