From c97a25b15202b533df02bfc7ce6a1dcb561e8492 Mon Sep 17 00:00:00 2001 From: Alexey 'Cluster' Avdyukhin Date: Sat, 14 Oct 2017 13:54:51 +0300 Subject: Better config saving --- WorkerForm.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'WorkerForm.cs') diff --git a/WorkerForm.cs b/WorkerForm.cs index 09b83104..25006c32 100644 --- a/WorkerForm.cs +++ b/WorkerForm.cs @@ -966,6 +966,7 @@ namespace com.clusterrr.hakchi_gui public static void SyncConfig(Dictionary Config, bool reboot = false) { var clovershell = MainForm.Clovershell; + const string configPath = "/etc/preinit.d/p0000_config"; // Writing config var config = new MemoryStream(); @@ -977,8 +978,7 @@ namespace com.clusterrr.hakchi_gui config.Write(data, 0, data.Length); } } - clovershell.Execute("cat > /tmp/config", config, null, null, 1000, true); - clovershell.Execute("temppath=/tmp ; source /etc/preinit ; script_init ; source /tmp/config ; source $preinit.d/pffff_config", null, null, null, 5000, true); + clovershell.Execute($"cat >> {configPath}", config, null, null, 3000, true); config.Dispose(); if (reboot) { -- cgit v1.2.3