don't copy /etc/resolv.conf if file exists, don't rm it on clean

This commit is contained in:
Adam Schaefers 2019-12-08 00:10:02 -08:00
parent bbb2d622d9
commit f453d0f99f
No known key found for this signature in database
GPG Key ID: DD4795B51117D906

View File

@ -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; {