diff options
author | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2019-10-26 07:04:00 -0500 |
---|---|---|
committer | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2019-10-26 07:04:00 -0500 |
commit | 1fdc18eb819b85cf54d80418892ac3dc1ad5a05c (patch) | |
tree | 119b9d1b4e6cf0fd4598a863818104db76542ae8 /hscript | |
parent | 49763c83f7075c64af2b06c07b46f8c256e21530 (diff) | |
download | horizon-1fdc18eb819b85cf54d80418892ac3dc1ad5a05c.tar.gz horizon-1fdc18eb819b85cf54d80418892ac3dc1ad5a05c.tar.bz2 horizon-1fdc18eb819b85cf54d80418892ac3dc1ad5a05c.tar.xz horizon-1fdc18eb819b85cf54d80418892ac3dc1ad5a05c.zip |
hscript: Append, don't replace, target net conf
This ensures if hostname execution wrote dns_domain_lo, it's preserved.
Diffstat (limited to 'hscript')
-rw-r--r-- | hscript/script.cc | 4 |
1 files changed, 2 insertions, 2 deletions
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"); |