Last active
January 10, 2020 09:47
-
-
Save enkunkun/690730f3df36c6248ab19315b1fbc73d to your computer and use it in GitHub Desktop.
Mount swapfile when booting from external storage (see: https://discussionsjapan.apple.com/thread/110201665 )
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 | |
sudo mv com.example.mountswap.plist /Library/LaunchAgents | |
sudo chown root:wheel /Library/LaunchAgents/com.example.mountswap.plist | |
sudo launchctl load com.example.mountswap.plist |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Label</key> | |
<string>com.example.mountswap</string> | |
<key>ProgramArguments</key> | |
<array> | |
<string>diskutil</string> | |
<string>mount</string> | |
<string>-mountPoint</string> | |
<string>/private/var/vm</string> | |
<string>disk3s4</string> | |
</array> | |
<key>RunAtLoad</key> | |
<true/> | |
</dict> | |
</plist> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment