Bug #6557
closed
nanobsd upgrades may fail from lacking resolv.conf
Added by Chris Buechler over 8 years ago.
Updated about 8 years ago.
Description
resolv.conf may not exist or be populated in the chroot of nanobsd upgrades on 2.3.x+. pkg uses that for fetching the files, so in that case, the upgrade will fail by being unable to fetch the pkg files.
The situation where they fail is where DNS Forwarder or Resolver are not bound to localhost. If resolv.conf doesn't exist, FreeBSD uses 127.0.0.1. Thanks to cjl for tracking that down.
- Status changed from Confirmed to Feedback
- % Done changed from 0 to 100
- Assignee set to Renato Botelho
- Target version changed from 2.3.1-p6 to 2.3.2
- Status changed from Feedback to Resolved
confirmed fixed on multiple upgrades
Sorry, but it seems not to be solved. I just upgraded from 2.3.2 to 2.3.2-p1 (NanoBSD) and the procedure still hangs on the resolv.conf problem.
I solved with the following lines:
local _resolv_conf=$(readlink -f /etc/resolv.conf)
_exec "unlink ${chroot_dir}/etc/resolv.conf" mute ignore_result
_exec "cp -f ${_resolv_conf} ${chroot_dir}/etc/resolv.conf" \
"Copying resolv.conf to upgrade partition" mute ignore_result
Also available in: Atom
PDF