# HG changeset patch # User Franz Glasner # Date 1661943695 -7200 # Node ID 6713d97b418047510d8763b5c4bfb0785eb687b0 # Parent dce9ba905c327eac638ae3c4077b273500be2834 Copy the host's resolv.conf into a jail when configuring it. But do not overwrite an existing resolv.conf. diff -r dce9ba905c32 -r 6713d97b4180 sbin/fjail --- a/sbin/fjail Wed Aug 31 12:55:51 2022 +0200 +++ b/sbin/fjail Wed Aug 31 13:01:35 2022 +0200 @@ -362,6 +362,14 @@ echo "WARNING: \"${_mp}/etc/localtime\" exists already -- not changed" fi + # resolv.conf + if [ ! -f "${_mp}/etc/resolv.conf" ]; then + echo "Copying the host's resolv.conf into the jail" + cp -p /etc/resolv.conf "${_mp}/etc/resolv.conf" + else + echo "WARNING: \"${_mp}/etc/resolv.conf\" exists already -- not changed" + fi + # # hostid and hostuuid should be set (at least for consistency ressons) # in vnet jails (see /etc/rc.d/hostid and /etc/rc.d/hostid_save).