Opened 14 years ago

Last modified 7 years ago

#22449 new enhancement

StartupItems page could be clearer?

Reported by: dreamcat4@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: guide Version:
Keywords: Cc:
Port:

Description

Hi! The macports guide: http://ruderich.com/macports/chunked/ch05s07.html

Just isn't quite clear enough when talking about startup items / daemondo / launchd plists. We hope it may be improved in three areas:

1) Daemondo command-line arguments (string quoting): The section 5.7.2 Note:


Do not wrap values in quotes if passing arguments to the daemon; “executable” StartupItem elements must be tagged individually so the spaces between arguments serve as delimiters for “string” tags. For example, this startupitem key/value pair:

startupitem.executable ${prefix}/sbin/vm-pop3d -d 10 -t 600


This explanatory note is well intentions, However it its just a little too unclear. A user may wrap the entire command string in quotes. The explanatory note says nothing against this (and execvp fails). TCL does not strip any outside quotes and therefore it would be better to say: "Do use quotes anywhere in the command string" rather than "Do not wrap values in quotes if passing arguments". BUT "A quoted string will be passed as-is.", "unlike regular shell command, quotes will not be stripped". etc. A clearer explanation (with examples) is provided on the mailing list thread.

Please see the mailinglist thread for full details: http://www.mail-archive.com/macports-users@lists.macosforge.org/msg16988.html

2) port load / port unload command not documented. This is a new feature, recently introduced into MacPorts. But it isn't mentioned anywhere in section 5.7.4. It seem to be applicable to daemondo items only. So that would correspond to plists created by "startupitem.executable" and "startupitem <script>" methods. Or a manually created script that called daaemondo.

"port load daemondo-label" "port unload daemondo-label"

See the blog post: http://www.reasonablyopinionated.com/2009/06/intro-to-using-launchctl-with-macports.html

It is also known that the command: "port load tagname" will work globally for all plist files. Or only daemondo plist files

3) Manual plists in files/ directory

Users can only create one plist file per Portfile. It may be the case for a complex software service, multiple plists need to be used. It would be nice to see a mention at the end of the page that explains briefly how you can put extra manual plists into files/ directory of a port. Thank you.

For all 1),2),3) Answers please see mailinglist dicussion: http://www.mail-archive.com/macports-users@lists.macosforge.org/msg16988.html

We were all quite confused but got there in the end !

Change History (5)

comment:1 Changed 14 years ago by jmroot (Joshua Root)

Cc: dreamcat4@… removed
Milestone: MacPorts 1.8.2
Priority: HighNormal
Type: requestenhancement
Version: 1.8.1

Not that it invalidates your report, but it seems odd that you would link to ruderich.com and not the official Guide at http://guide.macports.org/chunked/reference.startupitems.html.

comment:2 Changed 14 years ago by dreamcat4@…

Yes, did not know. But anyway either way the official guide is missing these notes. I hope the documentation maintainer can include this or please request me a git commit. Many thanks.

comment:3 Changed 10 years ago by mf2k (Frank Schima)

Keywords: launchd startupitem removed

markd has retired. See #44782.

comment:4 Changed 10 years ago by mf2k (Frank Schima)

Owner: changed from markd@… to macports-tickets@…

comment:5 Changed 7 years ago by raimue (Rainer Müller)

See also #16930.

Note: See TracTickets for help on using tickets.