···11+diff --git a/distrobuilder/lxc.generator b/distrobuilder/lxc.generator
22+index 0ad81d1..69dbfe7 100644
33+--- a/distrobuilder/lxc.generator
44++++ b/distrobuilder/lxc.generator
55+@@ -25,16 +25,6 @@ is_incus_vm() {
66+ [ -e /dev/virtio-ports/org.linuxcontainers.incus ]
77+ }
88+99+-# is_in_path succeeds if the given file exists in on of the paths
1010+-is_in_path() {
1111+- # Don't use $PATH as that may not include all relevant paths
1212+- for path in /bin /sbin /usr/bin /usr/sbin /usr/local/bin /usr/local/sbin; do
1313+- [ -e "${path}/$1" ] && return 0
1414+- done
1515+-
1616+- return 1
1717+-}
1818+-
1919+ ## Fix functions
2020+ # fix_ro_paths avoids udevd issues with /sys and /proc being writable
2121+ fix_ro_paths() {
2222+@@ -45,35 +35,6 @@ BindReadOnlyPaths=/sys /proc
2323+ EOF
2424+ }
2525+2626+-# fix_nm_link_state forces the network interface to a DOWN state ahead of NetworkManager starting up
2727+-fix_nm_link_state() {
2828+- [ -e "/sys/class/net/$1" ] || return 0
2929+- ip_path=
3030+- if [ -f /sbin/ip ]; then
3131+- ip_path=/sbin/ip
3232+- elif [ -f /bin/ip ]; then
3333+- ip_path=/bin/ip
3434+- else
3535+- return 0
3636+- fi
3737+- cat <<-EOF > /run/systemd/system/network-device-down.service
3838+-[Unit]
3939+-Description=Turn off network device
4040+-Before=NetworkManager.service
4141+-Before=systemd-networkd.service
4242+-[Service]
4343+-# do not turn off if there is a default route to 169.254.0.1, i.e. the device is a routed nic
4444+-ExecCondition=/bin/sh -c '! /usr/bin/grep -qs 00000000.0100FEA9 /proc/net/route'
4545+-ExecStart=-${ip_path} link set $1 down
4646+-Type=oneshot
4747+-RemainAfterExit=true
4848+-[Install]
4949+-WantedBy=default.target
5050+-EOF
5151+- mkdir -p /run/systemd/system/default.target.wants
5252+- ln -sf /run/systemd/system/network-device-down.service /run/systemd/system/default.target.wants/network-device-down.service
5353+-}
5454+-
5555+ # fix_systemd_override_unit generates a unit specific override
5656+ fix_systemd_override_unit() {
5757+ dropin_dir="/run/systemd/${1}.d"
5858+@@ -112,16 +73,7 @@ fix_systemd_mask() {
5959+ # fix_systemd_udev_trigger overrides the systemd-udev-trigger.service to match the latest version
6060+ # of the file which uses "ExecStart=-" instead of "ExecStart=".
6161+ fix_systemd_udev_trigger() {
6262+- cmd=
6363+- if [ -f /usr/bin/udevadm ]; then
6464+- cmd=/usr/bin/udevadm
6565+- elif [ -f /sbin/udevadm ]; then
6666+- cmd=/sbin/udevadm
6767+- elif [ -f /bin/udevadm ]; then
6868+- cmd=/bin/udevadm
6969+- else
7070+- return 0
7171+- fi
7272++ cmd=udevadm
7373+7474+ mkdir -p /run/systemd/system/systemd-udev-trigger.service.d
7575+ cat <<-EOF > /run/systemd/system/systemd-udev-trigger.service.d/zzz-lxc-override.conf
7676+@@ -145,24 +97,12 @@ EOF
7777+ }
7878+7979+ ## Main logic
8080+-# Nothing to do in Incus VM but deployed in case it is later converted to a container
8181+-is_incus_vm || is_lxd_vm && exit 0
8282+8383+ # Exit immediately if not an Incus/LXC container
8484+ is_lxc_container || exit 0
8585+8686+-# Check for NetworkManager
8787+-nm_exists=0
8888+-
8989+-is_in_path NetworkManager && nm_exists=1
9090+-
9191+ # Determine systemd version
9292+-for path in /usr/lib/systemd/systemd /lib/systemd/systemd; do
9393+- [ -x "${path}" ] || continue
9494+-
9595+- systemd_version="$("${path}" --version | head -n1 | cut -d' ' -f2)"
9696+- break
9797+-done
9898++systemd_version="$(systemd --version | head -n1 | cut -d' ' -f2)"
9999+100100+ # Determine distro name and release
101101+ ID=""
102102+@@ -222,11 +162,6 @@ ACTION=="add|change|move", ENV{ID_NET_DRIVER}=="veth", ENV{INTERFACE}=="eth[0-9]
103103+ EOF
104104+ fi
105105+106106+-# Workarounds for NetworkManager in containers
107107+-if [ "${nm_exists}" -eq 1 ]; then
108108+- fix_nm_link_state eth0
109109+-fi
110110+-
111111+ # Allow masking units created by the lxc system-generator.
112112+ for d in /etc/systemd/system /usr/lib/systemd/system /lib/systemd/system; do
113113+ if ! [ -d "${d}" ]; then