aboutsummaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorpaxchristi888@gmail.com <paxchristi888@gmail.com>2019-12-08 08:10:02 +0000
committerpaxchristi888@gmail.com <paxchristi888@gmail.com>2019-12-08 08:10:02 +0000
commit8506cb53ab24a19bbdbdef3cf6bb9030c9bc204f (patch)
tree4ebbcf93ad5dbe0cb95a93f688ffecc8aa0b3d54 /contrib
parent10765a73f513656d48007a09599ae5f74ed55323 (diff)
downloadcpt-8506cb53ab24a19bbdbdef3cf6bb9030c9bc204f.tar.gz
don't copy /etc/resolv.conf if file exists, don't rm it on clean
FossilOrigin-Name: 95401ee466066e750908e8594d431b4fac0dd21fa25991f57e734c31c6416c49
Diffstat (limited to 'contrib')
-rwxr-xr-xcontrib/kiss-chroot3
1 files changed, 1 insertions, 2 deletions
diff --git a/contrib/kiss-chroot b/contrib/kiss-chroot
index 372ef0a..52d5115 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; {