summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--roles/installer/debian/preseed/templates/preseed_debian-buster-with-raid.cfg.j25
-rw-r--r--roles/installer/debian/preseed/templates/preseed_xubuntu-focal-desktop.cfg.j25
2 files changed, 8 insertions, 2 deletions
diff --git a/roles/installer/debian/preseed/templates/preseed_debian-buster-with-raid.cfg.j2 b/roles/installer/debian/preseed/templates/preseed_debian-buster-with-raid.cfg.j2
index 0f669006..7907928a 100644
--- a/roles/installer/debian/preseed/templates/preseed_debian-buster-with-raid.cfg.j2
+++ b/roles/installer/debian/preseed/templates/preseed_debian-buster-with-raid.cfg.j2
@@ -136,7 +136,10 @@ d-i preseed/late_command string \
in-target bash -c "sed -e 's/^allow-hotplug/auto/' -i /etc/network/interfaces"; \
{% if preseed_force_net_ifnames_policy is defined %}
mkdir -p /target/etc/systemd/network; \
- in-target bash -c "echo '[Link]' > /etc/systemd/network/90-namepolicy.link"; \
+ in-target bash -c "echo '[Match]' > /etc/systemd/network/90-namepolicy.link"; \
+ in-target bash -c "echo 'OriginalName=*' >> /etc/systemd/network/90-namepolicy.link"; \
+ in-target bash -c "echo '' >> /etc/systemd/network/90-namepolicy.link"; \
+ in-target bash -c "echo '[Link]' >> /etc/systemd/network/90-namepolicy.link"; \
in-target bash -c "echo 'NamePolicy={{ preseed_force_net_ifnames_policy }}' >> /etc/systemd/network/90-namepolicy.link"; \
in-target bash -c "update-initramfs -u"; \
{% endif %}
diff --git a/roles/installer/debian/preseed/templates/preseed_xubuntu-focal-desktop.cfg.j2 b/roles/installer/debian/preseed/templates/preseed_xubuntu-focal-desktop.cfg.j2
index 155801a4..aad183c7 100644
--- a/roles/installer/debian/preseed/templates/preseed_xubuntu-focal-desktop.cfg.j2
+++ b/roles/installer/debian/preseed/templates/preseed_xubuntu-focal-desktop.cfg.j2
@@ -155,7 +155,10 @@ d-i preseed/late_command string \
in-target bash -c "sed -e 's/^allow-hotplug/auto/' -i /etc/network/interfaces"; \
{% if preseed_force_net_ifnames_policy is defined %}
mkdir -p /target/etc/systemd/network; \
- in-target bash -c "echo '[Link]' > /etc/systemd/network/90-namepolicy.link"; \
+ in-target bash -c "echo '[Match]' > /etc/systemd/network/90-namepolicy.link"; \
+ in-target bash -c "echo 'OriginalName=*' >> /etc/systemd/network/90-namepolicy.link"; \
+ in-target bash -c "echo '' >> /etc/systemd/network/90-namepolicy.link"; \
+ in-target bash -c "echo '[Link]' >> /etc/systemd/network/90-namepolicy.link"; \
in-target bash -c "echo 'NamePolicy={{ preseed_force_net_ifnames_policy }}' >> /etc/systemd/network/90-namepolicy.link"; \
in-target bash -c "update-initramfs -u"; \
{% endif %}