Skip to content

Instantly share code, notes, and snippets.

@zap0xfce2
Last active February 17, 2026 11:12
Show Gist options
  • Select an option

  • Save zap0xfce2/e01274231d80a6b57f2c4b899ea4bf02 to your computer and use it in GitHub Desktop.

Select an option

Save zap0xfce2/e01274231d80a6b57f2c4b899ea4bf02 to your computer and use it in GitHub Desktop.
Check and add auto_master entry if missing
#!/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
<?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>
@zap0xfce2
Copy link
Author

Die volle Beschreibung des Problems und der Lösung befindet sich unter: https://zap0xfce2.net/blog/150.die-bergbesteigung-auf-dem-geheimen-weg.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment