1

I'm trying to configure a NetBoot image so that a script will automatically launch on the target machine after it boots from the image

I've been using this article as a reference:

https://medium.com/@fahimhossain_16989/adding-startup-scripts-to-launch-daemon-on-mac-os-x-sierra-10-12-6-7e0318c74de1

my question is: when the following command is run...

# -w flag permanently adds the plist to the Launch Daemon
sudo launchctl load -w /Library/LaunchDaemons/com.startup.plist

...where is the resulting permanent configuration entry stored on the hard drive?

To clarify: I'm not asking for the location of the .plist file, I'm asking how/where does the system remember the .plist files that you've configured to run on startup using the 'sudo launchctl load' command?

  • Firstly, welcome to Ask Different! :) I hope you come to find this site has a lot to offer! In case you haven't already, it's worth taking the time to read the tour. All the best! – Monomeeth Mar 5 at 21:47
  • I think this answer might address your question. Let me know if this is the info you're looking for. – Allan Mar 5 at 21:50
  • You shouldn't need to explicitly load your daemon in this situation; plists in /Library/LaunchDaemons/ are auto-loaded at system startup (provided their format, permissions etc are correct). You only need launchctl load if you want to load a daemon after startup, or if it's been explicitly disabled and you want to override that. – Gordon Davisson Mar 5 at 23:13
0

You shouldn't need to explicitly load your daemon in this situation; plists in /Library/LaunchDaemons/ are auto-loaded at system startup (provided their format, permissions etc are correct). You only need launchctl load if you want to load a daemon after startup, or if it's been explicitly disabled and you want to override that.

– Gordon Davisson

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .