Skip to content

Instantly share code, notes, and snippets.

@kamawanu
Last active March 3, 2020 07:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kamawanu/85c67862ec4c5e4cb4d31bf5cd68ba24 to your computer and use it in GitHub Desktop.
Save kamawanu/85c67862ec4c5e4cb4d31bf5cd68ba24 to your computer and use it in GitHub Desktop.
#! /bin/sh
set -e
# Don't bother for loopback
if [ "$IFACE" = lo ]; then
exit 0
fi
# Only run from ifup.
if [ "$MODE" != start ]; then
exit 0
fi
# Only do it once (skip for inet6).
if [ "$ADDRFAM" != inet ]; then
exit 0
fi
/sbin/iw dev "$IFACE" set power_save off
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment