xref: /openbsd/share/man/man9/dostartuphooks.9 (revision 6eb325be)
1*6eb325beSmikeb.\"	$OpenBSD: dostartuphooks.9,v 1.11 2014/12/10 15:29:52 mikeb Exp $
2ec1f6c03Sniklas.\"
3ec1f6c03Sniklas.\" Copyright (c) 2001 Niklas Hallqvist.
4ec1f6c03Sniklas.\" All rights reserved.
5ec1f6c03Sniklas.\"
6ec1f6c03Sniklas.\" Redistribution and use in source and binary forms, with or without
7ec1f6c03Sniklas.\" modification, are permitted provided that the following conditions
8ec1f6c03Sniklas.\" are met:
9ec1f6c03Sniklas.\" 1. Redistributions of source code must retain the above copyright
10ec1f6c03Sniklas.\"    notice, this list of conditions and the following disclaimer.
11ec1f6c03Sniklas.\" 2. Redistributions in binary form must reproduce the above copyright
12ec1f6c03Sniklas.\"    notice, this list of conditions and the following disclaimer in the
13ec1f6c03Sniklas.\"    documentation and/or other materials provided with the distribution.
14ec1f6c03Sniklas.\" 3. The name of the author may not be used to endorse or promote products
15ec1f6c03Sniklas.\"    derived from this software without specific prior written permission
16ec1f6c03Sniklas.\"
17ec1f6c03Sniklas.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
18ec1f6c03Sniklas.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
19ec1f6c03Sniklas.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
20ec1f6c03Sniklas.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21ec1f6c03Sniklas.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22ec1f6c03Sniklas.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23ec1f6c03Sniklas.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24ec1f6c03Sniklas.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25ec1f6c03Sniklas.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26ec1f6c03Sniklas.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27ec1f6c03Sniklas.\"
28*6eb325beSmikeb.Dd $Mdocdate: December 10 2014 $
29ec1f6c03Sniklas.Dt DOSTARTUPHOOKS 9
30ec1f6c03Sniklas.Os
31ec1f6c03Sniklas.Sh NAME
32ec1f6c03Sniklas.Nm dostartuphooks
33ec1f6c03Sniklas.Nd run all startup hooks
34ec1f6c03Sniklas.Sh SYNOPSIS
35dddd2645Sschwarze.In sys/types.h
36dddd2645Sschwarze.In sys/systm.h
37ec1f6c03Sniklas.Ft void
38ec1f6c03Sniklas.Fn dostartuphooks "void"
39ec1f6c03Sniklas.Sh DESCRIPTION
40ec1f6c03SniklasThe
41ec1f6c03Sniklas.Fn dostartuphooks
42ec1f6c03Sniklasfunction invokes all startup hooks established using the
43ec1f6c03Sniklas.Xr startuphook_establish 9
44ec1f6c03Sniklasfunction.
45ec1f6c03SniklasStartup hooks are called in order, i.e.,
46ec1f6c03Sniklasthe startup hook established first will be called first.
47ec1f6c03Sniklas.Pp
48ec1f6c03SniklasThis function is called from
49ec1f6c03Sniklas.Fn main
50ec1f6c03Sniklaswith interrupts turned on.
51ec1f6c03SniklasIt is called immediately before the system configures its root and swap
52ec204a03Smpechdevices, but fully after all normal autoconfiguration.
53ec204a03SmpechThis can be used to let device subsystems needing delayed configuration (e.g.,
54ec204a03Smpechdue to very long initialization times) still provide the root device.
55ec1f6c03Sniklas.Pp
56*6eb325beSmikebStartup hooks are implemented via the more general
57ec1f6c03Sniklas.Xr dohooks 9
58ec1f6c03SniklasAPI.
59ec1f6c03Sniklas.Sh SEE ALSO
606e788039Sjmc.Xr dohooks 9 ,
61ec1f6c03Sniklas.Xr startuphook_establish 9
62