Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#44475 closed defect (fixed)

doc-issue: startupitem_install no

Reported by: ora.et.labora@… Owned by: jmpalacios (Juan Manuel Palacios)
Priority: Normal Milestone:
Component: website Version: 2.3.1
Keywords: Cc: cooljeanius (Eric Gallager)
Port:

Description

https://guide.macports.org/chunked/installing.macports.html states, that "startupitem_install" should be placed into $MP_PREFIX/etc/macports/sources.conf if no start-up items are to be placed into /Library/*.

Is that really correct? After having done so, I'm getting:

$ port version
Warning: /opt/local/etc/macports/sources.conf specifies invalid source 'startupitem_install no', ignored.
Version: 2.3.1

I assume that $MP_PREFIX/opt/local/etc/macports/macports.conf must be the proper location.

Side issue: However, why the need for an extra property? Aren't those two property settings equivalent?

startupitem_type       none
startupitem_install    no

But then: what does none really mean? The documentation is rather poor on this. Of course I do want to have the startup-items generated somewhere below $MP_PREFIX/opt/local. I just don't want that they are activated by default.

Change History (4)

comment:1 Changed 10 years ago by cooljeanius (Eric Gallager)

Cc: egall@… added

Cc Me!

comment:2 in reply to:  description Changed 10 years ago by larryv (Lawrence Velázquez)

Resolution: fixed
Status: newclosed

Replying to ora.et.labora@…:

I assume that $MP_PREFIX/opt/local/etc/macports/macports.conf must be the proper location.

You’re right; I’ve corrected the Guide in r122772.

However, why the need for an extra property? Aren't those two property settings equivalent?

startupitem_type       none
startupitem_install    no

They are not equivalent. The first disables creation of StartupItems completely; you’d use this if you didn’t want them available at all for some reason. The second only disables symlinking them into /Library and is usually used to prevent conflicts between two parallel MacPorts installations; I believe you can still have launchd load them by passing the full filenames to launchctl(1), although I’m not 100% sure.

comment:3 Changed 10 years ago by ora.et.labora@…

They are not equivalent. The first disables creation of StartupItems completely; you’d use this if you didn’t want them available at all for some reason. The second only disables symlinking them into /Library and is usually used to prevent conflicts between two parallel MacPorts installations; I believe you can still have launchd load them by passing the full filenames to launchctl(1), although I’m not 100% sure.

Thanks for the clarification.

Btw, I can confirm that passing full file name (absolute path) to launchctl works. It is rather the other way round, I never had success in doing

$ ls /Library/LaunchDaemons
[..]
org.macports.mysql56-server.plist@

$ launchctl load org.macports.mysql56-server 
launchctl: Couldn't stat("org.macports.mysql56-server"): No such file or directory

$ launchctl load org.macports.mysql56-server.plist  
launchctl: Couldn't stat("org.macports.mysql56-server.plist"): No such file or directory

$  launchctl load -D all org.macports.mysql56-server.plist 2>&1 | head
launchctl: Couldn't stat("org.macports.mysql56-server.plist"): No such file or directory
[..]
bind(): Address already in use
[..]
com.apple.AirPlayXPCHelper: Already loaded

$ launchctl load -D all org.macports.mysql56-server 2>&1 | head
launchctl: Couldn't stat("org.macports.mysql56-server"): No such file or directory
[..same as above ..]

comment:4 in reply to:  3 Changed 10 years ago by larryv (Lawrence Velázquez)

Replying to ora.et.labora@…:

Btw, I can confirm that passing full file name (absolute path) to launchctl works. It is rather the other way round, I never had success in doing

To be honest, I don’t really do much with launchd directly. If you’re curious about this behavior in general, you could inquire on the macports-users mailing list. If you only care about loading MacPorts-provided jobs, try port load:

% sudo port load mysql56-server
Note: See TracTickets for help on using tickets.