#!/bin/sh # If we are running NetworkManager, stop it before suspend/hibernate # and start it againg on resume/thaw. # TODO: Make NetworkManager smarter about how to handle sleep/resume # If we are asleep for less time than it takes for TCP to reset a # connection, and we are assigned the same IP on resume, we should # not break established connections. Apple can do this, and it is # rather nifty. . "${PM_FUNCTIONS}" case "$1" in hibernate|suspend) stop network-manager ;; thaw|resume) start network-manager ;; *) exit $NA ;; esac