OpenBSD uses an rc(8) style startup.
How rc(8) Works

The main files a system administrator should concentrate on are /etc/rc.conf, /etc/rc.local and /etc/rc.shutdown. To get a look of how the rc(8) procedure works, here is a the flow:
  1. After the kernel is booted. /etc/rc is started.
  2. Filesystems checked. This will always be bypassed if the file /etc/fastboot exists. This is certainly not a good idea though.
  3. Configuration Variables are read in from /etc/rc.conf
  4. Filesystems are mounted
  5. Clears out /tmp and preserves any editor files
  6. Configures the network via /etc/netstart
  7. Configures your interfaces up.
  8. Sets your hostname, domainname, etc.
  9. Starts system daemons
  10. Does various checks. (quota's, savecore, etc)
  11. Local daemons are run, ala /etc/rc.local
Starting Daemons and Services that come with OpenBSD

     Most daemons and services that come with OpenBSD by default can be started on boot by simply editing the /etc/rc.conf configuration file. To start out take a look at the default /etc/rc.conf file. You'll see lines similar to this:
ftpd_flags=NO           # for non-inetd use: ftpd_flags="-D"

     A line like this shows that ftpd is not starting up with the system. (At least not via rc(8), read the Anonymous FTP FAQ to read more about this.) In any case, each line also has a comment showing you the flags for NORMAL usage of that daemon or service. This doesn't mean that you must run that daemon or service with those flags. You can always use man(1) to see how you can have that daemon or service start up in any way you like. For example, Here is the default line pertaining to httpd(8):
httpd_flags=NO  # for normal use: "" (or "-DSSL" after reading ssl(8))

     Here you can obviously see that starting up httpd normally no flags are necessary. So a line like: " httpd_flags=""" would be necessary. But to start httpd with ssl enabled. (Refer to the SSL FAQ or ssl(8)) You should start with a line like: "httpd_flags="-DSSL"". Starting up local daemons and configuration

     For other daemons that you might install with the system via ports or other ways, you will use the /etc/rc.local file. For example, I've installed a daemon which lies at /usr/local/sbin/daemonx. I want this to start at boot time. I would put an entry into /etc/rc.local like this:
if [ -x /usr/local/sbin/daemonx ]; then
             echo -n ' daemonx';       /usr/local/sbin/daemonx
fi

     From now on, this daemon will be run at boot. You will be able to see any errors on boot, a normal boot with no errors would show a line like this:
Starting local daemons: daemonx.

rc.shutdown

     /etc/rc.shutdown is a script that is run a shutdown. Anything you want done before the system shuts down should be added to this file. If you have apm, you can also set "powerdown=YES". Which will give you the equivalent of "shutdown -p".