diff options
author | Jonathan Bauer | 2019-08-07 16:05:55 +0200 |
---|---|---|
committer | Jonathan Bauer | 2019-08-07 16:05:55 +0200 |
commit | fc88241348094d93ff7d7cb36d0011907b322dd1 (patch) | |
tree | f1dd15f34d9ae732dc183cf5cd4c40c6024a7658 /builder | |
parent | [slx-network] TIL: ip route replace (diff) | |
download | systemd-init-fc88241348094d93ff7d7cb36d0011907b322dd1.tar.gz systemd-init-fc88241348094d93ff7d7cb36d0011907b322dd1.tar.xz systemd-init-fc88241348094d93ff7d7cb36d0011907b322dd1.zip |
[slx-network] keep a copy of the network files
Diffstat (limited to 'builder')
-rw-r--r-- | builder/modules.d/slx-network/hooks/copy-network-config.sh | 4 |
1 files changed, 3 insertions, 1 deletions
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 |