O'Reilly logo

Absolute OpenBSD, 2nd Edition by Michael W. Lucas

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Packages and rc.d Scripts

Chapter 5 covered how to have OpenBSD start packaged software, but let’s review it quickly. When you install a package that can be started at boot time, the package also installs a startup script in /etc/rc.d. If I install the OpenLDAP server, the package installation will report:

…
The following new rcscripts were installed: /etc/rc.d/slapd

To start the slapd(8) OpenLDAP server at boot, add the script name to the pkg_scripts variable in /etc/rc.conf.local.

pkg_scripts="slapd"

OpenBSD runs these scripts in order at boot, and in reverse order at shutdown.

To change a package’s command-line arguments from the default, add a command _flags variable to rc.conf.local. Do not edit the startup script.

slapd_flags="-u _openldap ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required