summary refs log tree commit diff
path: root/debian/network-manager.postinst
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2013-01-29 02:25:35 +0100
committerMichael Biebl <biebl@debian.org>2013-01-29 02:25:38 +0100
commit3672f7938dd11b0d16e7cfe8804bc844a835bf80 (patch)
treef0ee9a0c9aa147a5a1d5e6c8984aff20f7400182 /debian/network-manager.postinst
parent422513e768d88a30fd7d56d62c61989341c0810b (diff)
No longer run the ifblacklist_migrate.sh script upon installation.
This script was used to comment out DHCP type network interface configurations
in /etc/network/interfaces as otherwise NM would mark such devices as
unmanaged. This script was buggy though and sometimes created a broken network
configuration.
Since debian-installer in wheezy (7.0) will create proper configuration for NM
if the network-manager package is part of the installation, this is no longer
necessary.
If users make a minimal system installation and install the network-manager
package afterwards, show a warning in postinst if we find any interface
configurations in /etc/network/interfaces.
(Closes: #688355, #690987, #606268)
Diffstat (limited to 'debian/network-manager.postinst')
-rw-r--r--debian/network-manager.postinst15
1 files changed, 11 insertions, 4 deletions
diff --git a/debian/network-manager.postinst b/debian/network-manager.postinst
index b2dd4353..17c4950d 100644
--- a/debian/network-manager.postinst
+++ b/debian/network-manager.postinst
@@ -42,10 +42,17 @@ case "$1" in
             kill `pidof /usr/sbin/nm-system-settings` 2>/dev/null || true
         fi
 
-        if [ -z "$2" ] || dpkg --compare-versions "$2" lt-nl "0.8.1-4"; then
-            if [ -f /etc/network/interfaces ]; then
-                echo "Disabling interfaces configured with plain DHCP in /etc/network/interfaces so that NetworkManager can take them over"
-                /usr/lib/NetworkManager/ifblacklist_migrate.sh
+        NIF=/etc/network/interfaces
+        if [ -z "$2" ] && [ -f $NIF ]; then
+            ifaces=`grep -v '^#' $NIF | awk '/iface/ {print $2}' | sort -u | sed -e 's/lo//' -e '/^$/d' -e 's/^/- /'`
+            if [ -n "$ifaces" ]; then
+                echo "" 1>&2
+                echo "The following network interfaces were found in $NIF" 1>&2
+                echo "which means they are currently configured by ifupdown:" 1>&2
+                echo "$ifaces" 1>&2
+                echo "If you want to manage those interfaces with NetworkManager instead" 1>&2
+                echo "remove their configuration from $NIF." 1>&2
+                echo "" 1>&2
             fi
         fi
         ;;