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 |