From 1fdc18eb819b85cf54d80418892ac3dc1ad5a05c Mon Sep 17 00:00:00 2001 From: "A. Wilcox" Date: Sat, 26 Oct 2019 07:04:00 -0500 Subject: hscript: Append, don't replace, target net conf This ensures if hostname execution wrote dns_domain_lo, it's preserved. --- hscript/script.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'hscript') diff --git a/hscript/script.cc b/hscript/script.cc index f1f36b8..5066b6b 100644 --- a/hscript/script.cc +++ b/hscript/script.cc @@ -1050,12 +1050,12 @@ bool Script::execute() const { } if(opts.test(Simulate)) { - std::cout << "cat >/target/etc/conf.d/net <<- NETCONF_EOF" + std::cout << "cat >>/target/etc/conf.d/net <<- NETCONF_EOF" << std::endl << conf.str() << std::endl << "NETCONF_EOF" << std::endl; } else { std::ofstream conf_file("/target/etc/conf.d/net", - std::ios_base::trunc); + std::ios_base::app); if(!conf_file) { output_error("internal", "cannot save network configuration " "to target"); -- cgit v1.2.3-70-g09d2