BSDCan2016 - v1.1.24a

BSDCan 2016
The Technical BSD Conference

Speakers
Antoine Jacoutot
Schedule
Day Talks #2 - 11 June - 2016-06-11
Room DMS 1140
Start time 10:00
Duration 01:00
Info
ID 698
Event type Lecture
Track System Administration
Language used for presentation English

OpenBSD rc.d(8)

OpenBSD has always used the traditional static BSD initialization script: /etc/rc. While dependable, it did not allow for easy integration with monitoring, configuration management software and/or any kind of tools requiring automated service handling. rc.d(8) was developed to abstract service management while pertaining the existing behavior like predictive and sequential start-up ordering (dependency-less).

The way OpenBSD boots hasn't changed much since its inception. This presentation will describe the OpenBSD rc.d(8) framework and rc.subr(8) daemon control routines. While it resembles other implementations, it was written from scratch to match the project objectives (simple, ordered, non-intrusive). I will describe the internals of rc.subr and talk about the implications that it had on the traditional BSD start-up sequence.

I will detail our requirements as well as the existing implementations and alternatives and explain why it was decided to write one from scratch. I will show how we managed to plug ourselves into the existent without having to transform it. I will describe how to use the rc.d control scripts and how start-up scripts look like. I will then introduce rcctl(8): an all-in-one utility for managing rc(8) daemons and services and look at how it helped orchestration and configuration management tools to work on OpenBSD (feature wise it is kind of a merge between the service(8) and chkconfig(8) utilities and a sysconfig editor as found in Red Hat).