Last active
August 1, 2021 05:48
-
-
Save karnauskas/3262c159df16079392b7ef554b2d6c0a to your computer and use it in GitHub Desktop.
Disable MacBook from starting automagically (YMMV)
This file contains hidden or 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 | |
| # https://www.cultofmac.com/646104/stop-macbook-autoboot-upon-opening/ | |
| set -e | |
| readonly p=$1 | |
| if [ "$p" == "on" ]; then | |
| sudo nvram AutoBoot=%03 | |
| elif [ "$p" == "off" ]; then | |
| sudo nvram AutoBoot=%00 | |
| else | |
| echo "usage: $0 on|off" | |
| exit 1 | |
| fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment