about summary refs log tree commit diff
path: root/debian/network-manager.postinst
diff options
context:
space:
mode:
Diffstat (limited to 'debian/network-manager.postinst')
-rw-r--r--debian/network-manager.postinst11
1 files changed, 11 insertions, 0 deletions
diff --git a/debian/network-manager.postinst b/debian/network-manager.postinst
index fbf4ed1a..e4fb2981 100644
--- a/debian/network-manager.postinst
+++ b/debian/network-manager.postinst
@@ -20,6 +20,17 @@ set -e
 
 case "$1" in
     configure)
+        # request a reboot (NM tears down interfaces on restart
+        # which is not the way we want to go)
+        [ -x /usr/share/update-notifier/notify-reboot-required ] && \
+            /usr/share/update-notifier/notify-reboot-required
+
+        update-rc.d -f NetworkManager remove >/dev/null
+
+        if [ -x "/etc/init.d/dbus" ]; then
+            invoke-rc.d dbus force-reload || true
+        fi
+
         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/^/- /'`