Skip to Content
Mac OS X in a Nutshell
book

Mac OS X in a Nutshell

by Jason McIntosh, Chuck Toporek, Chris Stone
January 2003
Intermediate to advanced
832 pages
32h 40m
English
O'Reilly Media, Inc.
Content preview from Mac OS X in a Nutshell

Configuring Startup Items

Starting up all the various system service daemons by hand every time the machine starts up would be quite a chore. As part of its coordination of the startup process, the SystemStarter application scans and runs special scripts kept in /Library/Startup Items/. To have a daemon launch at startup and be owned by the root user (so that it is running when the first user logs in, and continue to run until the machine is shut down or it’s explicitly killed), add to this collection of startup items or modify an existing one, if applicable. (More startup scripts are in /System/Library/Startup Items/, but, like everything else in the /System/ folder, are not meant to be messed with.)

Each object under Startup Items is a folder named after its function. Inside it lay two important files: a parameter list of options in StartupParameters.plist (see Section 13.8.3) and the script itself, which must have the same name as the folder.

For example, this is the entirety of /System/Library/StartupItems/SSH/SSH:

#!/bin/sh [1] . /etc/rc.common [2] ## # Start up secure login server ## if [ "${SSHSERVER:=-NO-}" = "-YES-" ]; then [3] ConsoleMessage "Starting Secure Login Server" [4] if [ ! -f /etc/ssh_host_key ]; then [5] echo "Generating ssh host RSA1 key..." ssh-keygen -t rsa1 -f /etc/ssh_host_key -N "" -C "$(hostname)" fi if [ ! -f /etc/ssh_host_rsa_key ]; then [5] echo "Generating ssh host RSA key..." ssh-keygen -t rsa -f /etc/ssh_host_rsa_key -N "" -C "$(hostname)" fi if ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Mac OS X Internals: A Systems Approach

Mac OS X Internals: A Systems Approach

Amit Singh
C++ In a Nutshell

C++ In a Nutshell

Ray Lischner
Linux Shell Scripting Cookbook - Third Edition

Linux Shell Scripting Cookbook - Third Edition

Clif Flynt, Sarath Lakshman, Shantanu Tushar
Optimized C++

Optimized C++

Kurt Guntheroth

Publisher Resources

ISBN: 0596003706Supplemental ContentCatalog PageErrata