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 -6 -l local0"

You can now manage your add-on software in any way you need.

Now let’s move on to configuring OpenBSD’s integrated software, through the files in /etc.



[34] In the IT industry, “minimal education” means a willingness to dig in and figure it out, plus a few years of college or professional experience; access to programming textbooks or other educational materials; or a whole lot of youth, stubbornness, and motivation.

[35] No, it’s not. There is no ftp10.usa.openbsd.org. Follow the instructions. Look at the mirror list and pick a mirror that actually exists and is close to you. Never blindly copy my examples!

[36] If you don’t see anything to worry about on any given server, you aren’t looking hard enough.

[37] This example exhausts my understanding of SQL. As long as I maintain my database ignorance, people won’t expect my help fixing their databases.

[38] Don’t laugh. It’s paid for.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset