From b9fa31365c91cfcbc891b36b411d3adc296ff6df Mon Sep 17 00:00:00 2001 From: "A. Wilcox" Date: Thu, 2 Apr 2020 21:40:02 -0500 Subject: hscript: Overwrite existing /e/n/i file, if present /etc/network/interfaces may already exists if an intermediate directory is being reused for image creation. Overwrite it, instead of appending to it. --- hscript/script_e.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'hscript/script_e.cc') diff --git a/hscript/script_e.cc b/hscript/script_e.cc index f4ca0a1..22b2ca6 100644 --- a/hscript/script_e.cc +++ b/hscript/script_e.cc @@ -362,7 +362,7 @@ bool Script::execute() const { "configuration directory", ec.message()); } } - std::ofstream conf_file(targ_netconf_file, std::ios_base::app); + std::ofstream conf_file(targ_netconf_file); if(!conf_file) { output_error("internal", "cannot save network configuration " "to target"); -- cgit v1.2.3-60-g2f50