I am having a mysterious problem trying to load a user LaunchAgent under Big Sur - It is the .plist of gniemetz's automount.sh
Code Block https://github.com/gniemetz/automount
for mounting SMB shares via pwd access from the Keychain -Placed the .sh into /usr/local/bin, chmod 644 and chown user:staff
Placed the LaunchAgent .plist into ~/Library/LaunchAgents (created LaunchAgents it as it didn't exist), same chmod/chown.
Code Block ~/Library drwxr-xr-x 3 users 96 Nov 1 22:13 LaunchAgents ~/Library/LaunchAgents -rw-r--r-- 1 users 1038 Nov 1 22:13 it.niemetz.automount.plist /usr/local drwxr-xr-x 4 root wheel 128 Nov 1 21:52 bin /usr/local/bin -rwxr-xr-x 1 root wheel 30310 Oct 29 21:58 automount.sh
then the following:
Code Block launchctl load -w ~/Library/LaunchAgents/it.niemetz.automount.plist Load failed: 5: Input/output error
For the life of me, I cannot find anywhere what this means...
Code Block launchctl start ~/Library/LaunchAgents/it.niemetz.automount.plist
completes with no errors, syntax also parses OK
Code Block plutil -lint ~/Library/LaunchAgents/it.niemetz.automount.plist /Users//Library/LaunchAgents/it.niemetz.automount.plist: OK
I have added Terminal and /bin/bash to Full Disk Access under Security...
Launching the script manually as /usr/local/bin/automount.sh works fine.
Console shows
Code Block launchctl load: system.log shows this when load -w is run: 00:27:14 mac-mini-Big-Sur com.apple.xpc.launchd[1] (com.apple.xpc.launchd.user.domain.1000002.100006.Aqua): entering bootstrap mode Nov 3 00:27:14 mac-mini-Big-Sur com.apple.xpc.launchd[1] (com.apple.xpc.launchd.user.domain.1000002.100006.Aqua): exiting bootstrap mode
For easy reference the .plist is pasted at the end -
Anyone seen this error before?
Thanks!
++
Code Block Label it.niemetz.automount LimitLoadToSessionType Aqua RunAtLoad WatchPaths /etc/resolv.conf /Library/Preferences/SystemConfiguration/NetworkInterfaces.plist /Library/Preferences/SystemConfiguration/com.apple.airport.preferences.plist ProgramArguments /usr/local/bin/automount.sh --mountall