Last active
February 17, 2026 11:12
-
-
Save zap0xfce2/e01274231d80a6b57f2c4b899ea4bf02 to your computer and use it in GitHub Desktop.
Check and add auto_master entry if missing
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 | |
| # Check and add auto_master entry if missing | |
| AUTO_MASTER="/etc/auto_master" | |
| ENTRY="/System/Volumes/Data/NetDrive auto_smb -nosuid,noowners" | |
| # Check if entry exists | |
| if ! grep -Fq "$ENTRY" "$AUTO_MASTER"; then | |
| echo "$ENTRY" >> "$AUTO_MASTER" | |
| automount -vc | |
| logger "auto_master entry added and automount reloaded" | |
| fi |
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
| <?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.local.check-automount</string> | |
| <key>ProgramArguments</key> | |
| <array> | |
| <string>/usr/local/bin/check_automount.sh</string> | |
| </array> | |
| <key>RunAtLoad</key> | |
| <true/> | |
| </dict> | |
| </plist> |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Die volle Beschreibung des Problems und der Lösung befindet sich unter: https://zap0xfce2.net/blog/150.die-bergbesteigung-auf-dem-geheimen-weg.html