aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornoreply@github.com <noreply@github.com>2019-12-10 09:36:52 +0000
committernoreply@github.com <noreply@github.com>2019-12-10 09:36:52 +0000
commit12329bc83d280f8f9f8f276ecead2565373d58ca (patch)
treebe24548c9fce8f3d494d40aeb65037b748cc9f60
parent10765a73f513656d48007a09599ae5f74ed55323 (diff)
parentc23d684d27f840032c143fb9979b1bb81c75533e (diff)
downloadcpt-12329bc83d280f8f9f8f276ecead2565373d58ca.tar.gz
Merge pull request #73 from a-schaefers/kiss-chroot
Only copy resolv.conf from host if it doesn't exist FossilOrigin-Name: 58a3a7781f5d26a40b149204351b9616e03afdca77ec257fab4310e411f8e5e1
-rwxr-xr-xcontrib/kiss-chroot3
1 files changed, 1 insertions, 2 deletions
diff --git a/contrib/kiss-chroot b/contrib/kiss-chroot
index 372ef0a..42146f9 100755
--- a/contrib/kiss-chroot
+++ b/contrib/kiss-chroot
@@ -20,7 +20,6 @@ clean() {
log Cleaning leftover host files; {
rm -f "$1/root/.ash_history"
- rm -f "$1/etc/resolv.conf"
}
}
@@ -39,7 +38,7 @@ main() {
}
log Copying /etc/resolv.conf from host; {
- cp /etc/resolv.conf "$1/etc"
+ [ -f "/$1/etc/resolv.conf" ] || cp /etc/resolv.conf "$1/etc"
}
log Entering chroot; {