Project

General

Profile

Bug #6557

nanobsd upgrades may fail from lacking resolv.conf

Added by Chris Buechler over 3 years ago. Updated about 3 years ago.

Status:
Resolved
Priority:
High
Category:
Upgrade
Target version:
Start date:
06/28/2016
Due date:
% Done:

100%

Estimated time:
Affected Version:
2.3.x
Affected Architecture:

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.

Associated revisions

Revision 5fac13aa (diff)
Added by Renato Botelho over 3 years ago

Make sure resolv.conf is present during nanobsd upgrade. Fixes #6557

Revision c55c2015 (diff)
Added by Renato Botelho over 3 years ago

Make sure resolv.conf is present during nanobsd upgrade. Fixes #6557

Revision e63e23ac (diff)
Added by Renato Botelho over 3 years ago

Make sure resolv.conf is present during nanobsd upgrade. Fixes #6557

Revision e18eadcc (diff)
Added by Renato Botelho over 3 years ago

Ignore cp result for cases when files are the same. Ticket #6557

Revision f1750639 (diff)
Added by Renato Botelho over 3 years ago

Ignore cp result for cases when files are the same. Ticket #6557

History

#1 Updated by Chris Buechler over 3 years ago

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.

#2 Updated by Renato Botelho over 3 years ago

  • Status changed from Confirmed to Feedback
  • % Done changed from 0 to 100

#3 Updated by Renato Botelho over 3 years ago

  • Assignee set to Renato Botelho

#4 Updated by Chris Buechler over 3 years ago

  • Target version changed from 2.3.1-p6 to 2.3.2

#5 Updated by Chris Buechler over 3 years ago

  • Status changed from Feedback to Resolved

confirmed fixed on multiple upgrades

#6 Updated by Andrew Hotlab about 3 years ago

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