Comment 3 for bug 1556676

Revision history for this message
Richard Elkins (texadactyl) wrote :

Automated work-around for 14.04.x:

Put the following shell script in /etc/pm/sleep.d:

#!/bin/sh
# ===> /etc/pm/sleep.d

MYNAME=$0

restart_ethernet() {
   /usr/bin/logger $MYNAME 'restart_ethernet(r8169) BEGIN'
   /sbin/modprobe -v -r r8169
   /sbin/modprobe -v r8169
   /usr/bin/logger $MYNAME 'restart_ethernet(r8169) END'
}

/usr/bin/logger $MYNAME 'case=[' ${1} ']'
case "${1}" in
   hibernate|suspend) ;;
   resume|thaw) restart_ethernet;;
esac