diff options
| -rw-r--r-- | debian/network-manager.postinst | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/debian/network-manager.postinst b/debian/network-manager.postinst index 0f95087f..b0b6ad30 100644 --- a/debian/network-manager.postinst +++ b/debian/network-manager.postinst @@ -44,6 +44,15 @@ case "$1" in ln -sf /run/NetworkManager/resolv.conf /etc/resolv.conf fi fi + + if dpkg --compare-versions "$2" le-nl "9999"; then + mkdir -p /etc/NetworkManager/conf.d || true + # for old versions, override the global config with a null config, + # but only if the netplan config has not been modified by an user. + if find /etc/netplan -name "*.yaml" | wc -l | grep -qc 0; then + touch /etc/NetworkManager/conf.d/10-globally-managed-devices.conf + fi + fi ;; abort-upgrade|abort-deconfigure|abort-remove) |