Created
September 3, 2015 04:27
-
-
Save jgeboski/8fb5a4f126dfd6aaeefb to your computer and use it in GitHub Desktop.
NetworkManager dispatcher for disabling WNIC power management
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
INTERFACE="${1}" | |
ACTION="${2}" | |
if [[ "${INTERFACE}" =~ ^wl.+ ]]; then | |
case "${ACTION}" in | |
up) iw dev "${INTERFACE}" set power_save off ;; | |
down) iw dev "${INTERFACE}" set power_save on ;; | |
esac | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment