Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #! /bin/sh
- # path should be /etc/NetworkManager/dispatcher.d/99-disable-wireless-when-wired
- self=${0##*/}
- log() { logger -p user.info -t "${self}[$$]" "$*" ;}
- iface=$1
- action=$2
- case $iface in eth*|usb*|en*)
- case $action in
- up)
- log "disabling wifi"
- nmcli radio wifi off ;;
- down)
- log "enabling wifi"
- nmcli radio wifi on ;;
- esac
- esac
Add Comment
Please, Sign In to add comment