Discussion:
resolv.conf with dhcp when upgrading with bsd.rd
(too old to reply)
Solène RAPENNE
2016-08-01 12:14:27 UTC
Permalink
Hello,

Using -current with unbound as a local dns resolver. dhclient.conf is
set to supersede the dhcp nameserver to use my unbound server

/etc/dhclient.conf
send host-name "solene";
supersede domain-name-servers 127.0.0.1;

When upgrading with bsd.rd, dhclient will use this dhclient.conf with
unbound stopped, the system won't resolve names and won't download
packages through http.

How can I use dhcp and keep 127.0.0.1 as domain name server except if
I'm using bsd.rd ?

If it's not possible or too complicated, is there a better way than
downloading the packages in the same time I download bsd.rd and not use
network during the upgrade ?


Regards
Raf Czlonka
2016-08-01 12:43:42 UTC
Permalink
Post by Solène RAPENNE
Hello,
Using -current with unbound as a local dns resolver. dhclient.conf is set to
supersede the dhcp nameserver to use my unbound server
/etc/dhclient.conf
send host-name "solene";
supersede domain-name-servers 127.0.0.1;
When upgrading with bsd.rd, dhclient will use this dhclient.conf with
unbound stopped, the system won't resolve names and won't download packages
through http.
How can I use dhcp and keep 127.0.0.1 as domain name server except if I'm
using bsd.rd ?
If it's not possible or too complicated, is there a better way than
downloading the packages in the same time I download bsd.rd and not use
network during the upgrade ?
Yep - simply download the sets before and use 'disk' instead of 'http'.

http://marc.info/?l=openbsd-misc&m=141552533922277

and something like this before you put the ramdisk back:

SETSDIR=/path/to/directory/with/sets
echo "Location of sets = disk
Is the disk partition already mounted = yes
Pathname to the sets = $SETSDIR" > /mnt/auto_upgrade.conf

I've been using a home-grown script based on the above for over a
year with snapshots - and it works just fine.

Regards,

Raf
Jeremie Courreges-Anglas
2016-08-01 12:57:33 UTC
Permalink
Post by Solène RAPENNE
Hello,
Using -current with unbound as a local dns resolver. dhclient.conf is
set to supersede the dhcp nameserver to use my unbound server
/etc/dhclient.conf
send host-name "solene";
supersede domain-name-servers 127.0.0.1;
When upgrading with bsd.rd, dhclient will use this dhclient.conf with
unbound stopped, the system won't resolve names and won't download
packages through http.
How can I use dhcp and keep 127.0.0.1 as domain name server except if
I'm using bsd.rd ?
Not a direct response to your question, but what I do is use "prepend"
instead of "supersede".
Post by Solène RAPENNE
If it's not possible or too complicated, is there a better way than
downloading the packages in the same time I download bsd.rd and not use
network during the upgrade ?
Regards
--
jca | PGP: 0x1524E7EE / 5135 92C1 AD36 5293 2BDF DDCC 0DFA 74AE 1524 E7EE
Solène Rapenne
2016-08-03 21:07:02 UTC
Permalink
Post by Solène RAPENNE
When upgrading with bsd.rd, dhclient will use this dhclient.conf with
unbound stopped, the system won't resolve names and won't download
packages
through http.
How can I use dhcp and keep 127.0.0.1 as domain name server except if
I'm
using bsd.rd ?
^Z out from the installer (or use the shell before entering upgrade)
then
echo "nameserver 8.8.8.8" >>/etc/resolv.conf
and fg back to installer. Substitute 8.8.8.8 with your preferred DNS.
Good idea, but it would be even better to use > instead of >> because
it's a temporary /etc/resolv.conf.

I didn't think about ^Z, I dropped to shell then re-run the installer
but it rerun dhcp and the changes were overwrited.
Solène Rapenne
2016-08-03 21:07:52 UTC
Permalink
Post by Jeremie Courreges-Anglas
Post by Solène RAPENNE
Hello,
Using -current with unbound as a local dns resolver. dhclient.conf is
set to supersede the dhcp nameserver to use my unbound server
/etc/dhclient.conf
send host-name "solene";
supersede domain-name-servers 127.0.0.1;
When upgrading with bsd.rd, dhclient will use this dhclient.conf with
unbound stopped, the system won't resolve names and won't download
packages through http.
How can I use dhcp and keep 127.0.0.1 as domain name server except if
I'm using bsd.rd ?
Not a direct response to your question, but what I do is use "prepend"
instead of "supersede".
Post by Solène RAPENNE
If it's not possible or too complicated, is there a better way than
downloading the packages in the same time I download bsd.rd and not
use
network during the upgrade ?
Regards
Hello,

I think I'll go to this solution, with a timeout set to a few seconds so
it doesn't hang too long if it has no result.

regards
trondd
2016-08-03 21:26:57 UTC
Permalink
Post by Solène Rapenne
Post by Solène RAPENNE
When upgrading with bsd.rd, dhclient will use this dhclient.conf with
unbound stopped, the system won't resolve names and won't download
packages
through http.
How can I use dhcp and keep 127.0.0.1 as domain name server except if
I'm
using bsd.rd ?
^Z out from the installer (or use the shell before entering upgrade)
then
echo "nameserver 8.8.8.8" >>/etc/resolv.conf
and fg back to installer. Substitute 8.8.8.8 with your preferred DNS.
Good idea, but it would be even better to use > instead of >> because
it's a temporary /etc/resolv.conf.
I didn't think about ^Z, I dropped to shell then re-run the installer
but it rerun dhcp and the changes were overwrited.
You can drop to the shell any time with !
Modify your resolv.conf after it brings up the network interface. Or
learn your mirrors's IP address.

Tim.
Ossi Herrala
2016-08-03 20:11:58 UTC
Permalink
Post by Solène RAPENNE
When upgrading with bsd.rd, dhclient will use this dhclient.conf with
unbound stopped, the system won't resolve names and won't download packages
through http.
How can I use dhcp and keep 127.0.0.1 as domain name server except if I'm
using bsd.rd ?
^Z out from the installer (or use the shell before entering upgrade)
then

echo "nameserver 8.8.8.8" >>/etc/resolv.conf

and fg back to installer. Substitute 8.8.8.8 with your preferred DNS.
--
Ossi Herrala
Loading...