Received: from mail-yb1-f176.google.com (mail-yb1-f176.google.com [209.85.219.176]) by nld3-dev1.alpinelinux.org (Postfix) with ESMTPS id B62A1781AEB for <~alpine/users@lists.alpinelinux.org>; Thu, 29 Apr 2021 07:02:17 +0000 (UTC) Received: by mail-yb1-f176.google.com with SMTP id p126so23559318yba.1 for <~alpine/users@lists.alpinelinux.org>; Thu, 29 Apr 2021 00:02:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=hpsG2AQrXuzdpMUhNyR3taTg6TL4s5J2677yvu4lB70=; b=S9YvVsUSwwHb/T+2qe4U8dzGrH6X4ZNIXhREgj49kXrk/zYxKC/dU5Bld1SNiPNgDn PtJ17R5BtFYnoQNwlweAzWT82xm0qiVR4doiPy7oBbDazvG2nBZ52wkDJIFhyqINpdkK fLU8fwiP9UiRyCp5XVXiwcgdjawdlGhcK/z8tm7f9DvvrI1MGXghIo2mO09PMdFzAi36 bZjNtGjN+zd4hjw/f0x+PqfrZUS3TVLPLkIYYI88eaI4eQkch1voPaiHM03hR5YrFiHs PuGK22vTg8Ta19KmkBv2lWSN8cvjonhPadwDSfen0N3sVzKByTJSnqoi11GC73Ve56sU 66XQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=hpsG2AQrXuzdpMUhNyR3taTg6TL4s5J2677yvu4lB70=; b=Qe1iUm3yuP/s8S4Hp/PqQi9/wAECR2+pXOcu1HeNi6Mpzy/uDZH5GtRQSlDsr1Oae8 R3K+fZ6Z65Om4Zvt3miDEtYAgvV61KvLMHJ7hLPh/StBXqdHvFRWgE4OYd7enklF+tfv a9WZvkak1bkZ6FYhcyqQcTOJfqwNrsSev7TUhM9loz7B15rXg5R1CuBS/x+YMReYTeOG udb7D35d1bf19udohRrE/Fn+7pclPGYQQnAX5loB7r6iEB7nBmVc8JmsarxkpqjCKRAH FRgWYNiG5KRak3QonZ6BdxBTYMOx1Hhx/IpsdY05IcZby3ydKQGz0djwoPP9y5RigZ4L ysrQ== X-Gm-Message-State: AOAM531Vf2Y2W2yuakEXyTYjU5wGYZ242zgTF06mQtThhkuEL0UYnnAN UKaKLXS8hR6WUiFySsUXFy48Q2hzVgH6iDXFNu0qeGBIvwk= X-Google-Smtp-Source: ABdhPJy9kXR/GAAV7drZmqaU2YUWvCIoWrhia3P8nxCXmzMhHRx7/TP+POdxDcDSG2G5sDiAXsoJuBU/LRN8TiUVezA= X-Received: by 2002:a25:6f89:: with SMTP id k131mr24680960ybc.491.1619679736663; Thu, 29 Apr 2021 00:02:16 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Konstantin Kulikov Date: Thu, 29 Apr 2021 10:02:05 +0300 Message-ID: Subject: Re: dhcpcd not updating /etc/resolv.conf To: David Demelier Cc: ~alpine/users@lists.alpinelinux.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable You can add a bunch of printfs in /usr/lib/dhcpcd/dhcpcd-hooks/20-resolv.co= nf On Thu, Apr 29, 2021 at 9:05 AM David Demelier wrote= : > > Hey there, > > For some reasons I could not get dhcpcd to update /etc/resolv.conf on Alp= ine 3.13 (aarch64) on a Raspberry Pi. > > The system: > > Linux vanille 5.10.29-0-rpi4 #1-Alpine SMP PREEMPT Mon Apr 12 15:55:08 UT= C 2021 aarch64 Linux > > > The daemon acquire a lease correctly in both eth0 and wlan0 and set defau= lt route, IP address and such (I can ping every IP address) but for some re= asons the resolv.conf file is empty. > > Example of syslog messages when it receives DHCP lease: > > Apr 28 22:42:11 vanille daemon.info [3203]: wlan0: connected to Access Po= int `Bbox-4D2019EB' > Apr 28 22:42:11 vanille daemon.info [3203]: eth0: waiting for carrier > Apr 28 22:42:11 vanille daemon.info [3203]: DUID 00:01:00:01:27:87:66:06:= dc:a6:32:5f:6f:dc > Apr 28 22:42:11 vanille daemon.info [3203]: wlan0: IAID 32:5f:6f:dc > Apr 28 22:42:11 vanille daemon.info [3203]: wlan0: adding address fe80::d= ea6:32ff:fe5f:6fdc > Apr 28 22:42:11 vanille daemon.info [3203]: wlan0: soliciting an IPv6 rou= ter > Apr 28 22:42:12 vanille daemon.info [3203]: wlan0: rebinding lease of 192= .168.1.97 > Apr 28 22:42:12 vanille daemon.info [3203]: wlan0: probing address 192.16= 8.1.97/24 > Apr 28 22:42:17 vanille daemon.info [3203]: wlan0: leased 192.168.1.97 fo= r 86400 seconds > Apr 28 22:42:17 vanille daemon.info [3203]: wlan0: adding route to 192.16= 8.1.0/24 > Apr 28 22:42:17 vanille daemon.info [3203]: wlan0: adding default route v= ia 192.168.1.254 > Apr 28 22:42:17 vanille daemon.info [3203]: forked to background, child p= id 3221 > Apr 28 22:42:25 vanille daemon.warn [3221]: wlan0: no IPv6 Routers availa= ble > > And the ip a show: > > 1: lo: mtu 65536 qdisc noqueue state UNKNOWN qlen = 1000 > link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 > inet 127.0.0.1/8 scope host lo > valid_lft forever preferred_lft forever > inet6 ::1/128 scope host > valid_lft forever preferred_lft forever > 2: eth0: mtu 1500 qdisc mq state UP qle= n 1000 > link/ether dc:a6:32:5f:6f:da brd ff:ff:ff:ff:ff:ff > inet 192.168.1.95/24 brd 192.168.1.255 scope global dynamic eth0 > valid_lft 86054sec preferred_lft 75254sec > inet6 fe80::dea6:32ff:fe5f:6fda/64 scope link > valid_lft forever preferred_lft forever > 3: wlan0: mtu 1500 qdisc pfifo_fast sta= te UP qlen 1000 > link/ether dc:a6:32:5f:6f:dc brd ff:ff:ff:ff:ff:ff > inet 192.168.1.97/24 brd 192.168.1.255 scope global dynamic wlan0 > valid_lft 86071sec preferred_lft 75271sec > inet6 fe80::dea6:32ff:fe5f:6fdc/64 scope link > valid_lft forever preferred_lft forever > > And the resolv.conf once done: > > # Generated by dhcpcd > # /etc/resolv.conf.head can replace this line > # /etc/resolv.conf.tail can replace this line > > The /etc/dhcpcd.conf is quite simple: > > hostname > > interface eth0 > metric 10 > > interface wlan0 > metric 20 > > If I install openresolv, dhcpcd calls it but the generated file is also e= mpty (only the header changes). However using busybox=E2=80=99s udhcpd work= s fine and generates the appropriate nameserver line in /etc/resolv.conf. > > I=E2=80=99ve been using dhcpcd for years without any problems on many mac= hines but now I=E2=80=99m completely out of ideas about this problem. I als= o prefer dhcpcd over busybox=E2=80=99s udhcpd/ifplugng because it does a ve= ry good job about hotplugging interfaces and non blocking boot (also offers= a GTK UI). > > Any idea would be appreciated.