From fc88241348094d93ff7d7cb36d0011907b322dd1 Mon Sep 17 00:00:00 2001 From: Jonathan Bauer Date: Wed, 7 Aug 2019 16:05:55 +0200 Subject: [slx-network] keep a copy of the network files --- builder/modules.d/slx-network/hooks/copy-network-config.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'builder/modules.d/slx-network') diff --git a/builder/modules.d/slx-network/hooks/copy-network-config.sh b/builder/modules.d/slx-network/hooks/copy-network-config.sh index eeab0c85..0ccafdbc 100644 --- a/builder/modules.d/slx-network/hooks/copy-network-config.sh +++ b/builder/modules.d/slx-network/hooks/copy-network-config.sh @@ -2,7 +2,9 @@ if [ -n "$NEWROOT" ]; then for file in /etc/{hostname,resolv.conf,hosts}; do - unlink "${NEWROOT}/${file}" + if [ -e "${NEWROOT}/${file}" ]; then + mv "${NEWROOT}/${file}" "${NEWROOT}/${file}.stage4" + fi cp -f "$file" "${NEWROOT}/etc" done fi -- cgit v1.2.3-55-g7522