Scheduled maintenance — back soon.

~/blog/handle-the-network-connection-on-suspendresume

Handle the network connection on suspend / resume

Whenever I have suspend/resumed my Gentoo system I found my wifi network status as started but actually not working. I guess that standby/hibernate/suspend is handled by sys-power/pm-utils, which is very well described here, I can make use of it to handle the network connection on suspend / resume. Create a /etc/pm/sleep.d/50wifi (with +x permission) with the following code:


#!/bin/bash
case $1 in
suspend)
echo "Stopping wifi"
/etc/init.d/net.wlan0 stop > /dev/null
;;
resume)
echo "Starting wifi";
/etc/init.d/net.wlan0 start > /dev/null
;;
esac

Comments

No comments yet

Be the first to leave a comment.

Leave a comment

Name and email required · moderated before publish · plain text only