@@ -135,13 +135,7 @@ bsdinstall distextract
135
135
sed -i " " -e " s/^Components .*/Components world/" " ${BSDINSTALL_CHROOT} /etc/freebsd-update.conf"
136
136
mkdir -p " ${BSDINSTALL_CHROOT} /usr/local/etc/pkg/repos"
137
137
echo -e " FreeBSD: {\n url: \" pkg+http://${PKG_MIRROR} /\$ {ABI}/${PKG_REPO} \" ,\n}" > " ${BSDINSTALL_CHROOT} /usr/local/etc/pkg/repos/FreeBSD.conf"
138
- echo " search $( hostname) " > " ${BSDINSTALL_CHROOT} /etc/resolv.conf"
139
- if [ " ${USE_IPV4} " = " yes" ]; then
140
- echo " nameserver ${INTERFACE_IP} " >> " ${BSDINSTALL_CHROOT} /etc/resolv.conf"
141
- fi
142
- if [ " ${USE_IPV6} " = " yes" ]; then
143
- echo " nameserver ${IPV6_PREFIX}${INTERFACE_IP6} " >> " ${BSDINSTALL_CHROOT} /etc/resolv.conf"
144
- fi
138
+ cp /etc/resolv.conf " ${BSDINSTALL_CHROOT} /etc/resolv.conf"
145
139
if [ " ${UPDATE} " != " no" -a " ${OS_VERSION_NAME} " = " RELEASE" ]; then
146
140
chroot " ${BSDINSTALL_CHROOT} " freebsd-update fetch install
147
141
fi
@@ -171,6 +165,13 @@ if [ "${NAME}" = "network" ]; then
171
165
-e " s;BASE_WORKDIR;${BASE_WORKDIR} ;g" \
172
166
-e " s;INTERFACE;${INTERFACE} ;g" \
173
167
" ${SCRIPT_DIR} /../templates/network-jail.conf" > " /etc/jail.conf.d/${NAME} .conf"
168
+ echo " search $( hostname) " > " ${BSDINSTALL_CHROOT} /etc/resolv.conf"
169
+ if [ " ${USE_IPV4} " = " yes" ]; then
170
+ echo " nameserver ${INTERFACE_IP} " >> " ${BSDINSTALL_CHROOT} /etc/resolv.conf"
171
+ fi
172
+ if [ " ${USE_IPV6} " = " yes" ]; then
173
+ echo " nameserver ${IPV6_PREFIX}${INTERFACE_IP6} " >> " ${BSDINSTALL_CHROOT} /etc/resolv.conf"
174
+ fi
174
175
else
175
176
MOUNTS=$( get_mounts)
176
177
DEPENDS=$( get_dependencies)
0 commit comments