Comment 20 for bug 1937110

Revision history for this message
Mauricio Faria de Oliveira (mfo) wrote :

Verification done on focal
(full steps on comment #13)

$ lxc shell focal-dhcpd

# add-apt-repository -y 'deb http://archive.ubuntu.com/ubuntu focal-proposed main'

root@focal-dhcpd:~# apt policy isc-dhcp-client
isc-dhcp-client:
  Installed: 4.4.1-2.1ubuntu5.20.04.4
  Candidate: 4.4.1-2.1ubuntu5.20.04.5
  Version table:
     4.4.1-2.1ubuntu5.20.04.5 500
        500 http://archive.ubuntu.com/ubuntu focal-proposed/main amd64 Packages
...

# apt download isc-dhcp-client
# python3 -m http.server
...

$ lxc shell focal-dhclient

# wget 10.11.12.13:8000/isc-dhcp-client_4.4.1-2.1ubuntu5.20.04.5_amd64.deb
# dpkg -i isc-dhcp-client_4.4.1-2.1ubuntu5.20.04.5_amd64.deb

# lsinitramfs /boot/initrd.img-$(uname -r) | grep dhclient-exit-hooks.d
#

# update-initramfs -u

# lsinitramfs /boot/initrd.img-$(uname -r) | grep dhclient-exit-hooks.d
etc/dhcp/dhclient-exit-hooks.d
etc/dhcp/dhclient-exit-hooks.d/rfc3442-classless-routes

# cat <<EOF >/etc/default/grub.d/99-grub-initrd.cfg
GRUB_FORCE_PARTUUID=
GRUB_CMDLINE_LINUX_DEFAULT="$GRUB_CMDLINE_LINUX_DEFAULT console=ttyS0 ip=dhcp break=init"
EOF

# update-grub && poweroff

$ lxc start --console focal-dhclient
...
(initramfs) ip addr
...
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq qlen 1000
    link/ether 00:16:3e:3b:52:42 brd ff:ff:ff:ff:ff:ff
    inet 10.11.12.102/24 brd 10.11.12.255 scope global eth0
       valid_lft forever preferred_lft forever
    inet6 fe80::216:3eff:fe3b:5242/64 scope link
       valid_lft forever preferred_lft forever

(initramfs) ip route
default via 10.11.12.13 dev eth0
1.0.0.0/8 via 10.11.12.208 dev eth0
2.1.0.0/16 via 10.11.12.216 dev eth0
3.2.1.0/24 via 10.11.12.224 dev eth0
4.3.2.1 via 10.11.12.232 dev eth0
10.11.12.0/24 dev eth0 scope link src 10.11.12.102

(initramfs) exit