LaunchDaemon not loading after Sonoma update

I updated my computer to Sonoma, and now my LaunchDaemon will not load.

I have the following setup :

File in /Library/LaunchDaemons/com.startup.plist

like this :

<?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.startup</string>
	<key>ProgramArguments</key>
	<array>
		<string>/usr/local/bin/bash</string>
		<string>/Library/Scripts/Startup/startup.sh</string>
	</array>
	<key>RunAtLoad</key>
	<true/>
	<key>StandardErrorPath</key>
	<string>/tmp/com.startup.stderr</string>
	<key>StandardOutPath</key>
	<string>/tmp/com.startup.stdout</string>
</dict>
</plist>


File in File in /Library/Scripts/Startup/startup.sh

#!/bin/zsh
PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users:/Users/root:/Users/root/Scripts:/Library/Scripts:/Library/Scripts/Startup
#Load modules for Fuse
/Library/Filesystems/macfuse.fs/Contents/Resources/load_macfuse
/usr/sbin/sysctl -w vfs.generic.macfuse.tunables.allow_other=1
#Connect to XXXXXX_net
/bin/sleep 28
myip=0
while [ $myip = 0 ]
do
/bin/sleep 3
myip=$(ifconfig -l | xargs -n1 ipconfig getifaddr)
done
/usr/local/bin/sshfs XXXX@XXXXXX.net: /Volumes/XXXXXX.net -o local,auto_cache,reconnect,ServerAliveInterval=15,ServerAliveCountMax=3,ConnectTimeout=5,daemon_timeout=60,iosize=2097152,volname=XXXXXX.net,allow_other,defer_permissions,async_read,Ciphers=aes128-gcm@openssh.com,Cipher=aes128-gcm@openssh.com,compression=no

And then we need some commands to be run as root user during boot :

/private/etc/sudoers.d/startup-script-nopasswd

username ALL = (root) NOPASSWD: /usr/sbin/sysctl
username ALL = (root) NOPASSWD: /usr/local/bin/sshfs

As of now, I cant even get the /Library/LaunchDaemons/com.startup.plist

to run after i updated the macOS to Sonoma ….

In situations like this I recommend that you start small. If you replace startup.sh with a test script, do you see it load?

A good way to check that is to write a message to the system log like so:

% log emit --subsystem "com.startup" --category "default" "My message"

That makes it easy to find in the load by searching for the subsystem and category. See Your Friend the System Log for advice on that front.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Hi I put your command line in startup.sh

So the "startup.sh" now looks like this :

#!/bin/zsh
PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users:/Users/root:/Users/root/Scripts:/Library/Scripts:/Library/Scripts/Startup
#Load modules for Fuse
log emit --subsystem "com.startup" --category "default" "Message from Tormod"

The message does NOT appeat in the system log.

I am also having some "kernel panic" at boot time.

Log from boot attached.

I have the "LaunchControl" software, and the "com.startup.plist" looks like this in the software :

I ended up reinstalling the macOS by using an USB boot disk. Now running Sequoia I did a format of the mac disk before install. Then I restored the user files by use of time machine.

I then reinstalled latest version on macFUSE. The kernel panic is gone now. Probably the cause for the kernel panic was an unfavorable combination of kexts.

Regarding the plists. I did not reinstall any apps from the time machine, so just now I do not have any .plist in /Library/LaunchAgents, /Library/LaunchDaemons. I will reinstall some of the apps / programs, but will be more selective when reinstalling programs.

There is an alternative to macFUSE, called fuse-t, but I have not tested fuse-t with sshfs. Most of the linux versions come with some sort of sshfs, but for mac this is not included.

I will now reinstall my /Library/LaunchDaemons/com.startup.plist /Library/Scripts/Startup/startup.sh and /private/etc/sudoers.d/startup-script-nopasswd

Will give an update when this is done

LaunchDaemon not loading after Sonoma update
 
 
Q