xref: /illumos-gate/usr/src/man/man5/init.5 (revision bbf215553c7233fbab8a0afdf1fac74c44781867)
1*bbf21555SRichard Lowe'\"
2*bbf21555SRichard Lowe.\" Copyright 2021 OmniOS Community Edition (OmniOSce) Association.
3*bbf21555SRichard Lowe.\" Copyright 2014 Garrett D'Amore
4*bbf21555SRichard Lowe.\" Copyright (c) 2003, Sun Microsystems, Inc. All Rights Reserved.
5*bbf21555SRichard Lowe.\" Copyright 1989 AT&T
6*bbf21555SRichard Lowe.\"
7*bbf21555SRichard Lowe.\" The contents of this file are subject to the terms of the
8*bbf21555SRichard Lowe.\" Common Development and Distribution License (the "License").
9*bbf21555SRichard Lowe.\" You may not use this file except in compliance with the License.
10*bbf21555SRichard Lowe.\"
11*bbf21555SRichard Lowe.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
12*bbf21555SRichard Lowe.\" or http://www.opensolaris.org/os/licensing.
13*bbf21555SRichard Lowe.\" See the License for the specific language governing permissions
14*bbf21555SRichard Lowe.\" and limitations under the License.
15*bbf21555SRichard Lowe.\"
16*bbf21555SRichard Lowe.\" When distributing Covered Code, include this CDDL HEADER in each
17*bbf21555SRichard Lowe.\" file and include the License file at usr/src/OPENSOLARIS.LICENSE.
18*bbf21555SRichard Lowe.\" If applicable, add the following below this CDDL HEADER, with the
19*bbf21555SRichard Lowe.\" fields enclosed by brackets "[]" replaced with your own identifying
20*bbf21555SRichard Lowe.\" information: Portions Copyright [yyyy] [name of copyright owner]
21*bbf21555SRichard Lowe.\"
22*bbf21555SRichard Lowe.Dd November 7, 2021
23*bbf21555SRichard Lowe.Dt INIT 5
24*bbf21555SRichard Lowe.Os
25*bbf21555SRichard Lowe.Sh NAME
26*bbf21555SRichard Lowe.Nm init ,
27*bbf21555SRichard Lowe.Nm TIMEZONE
28*bbf21555SRichard Lowe.Nd set default system time zone and locale
29*bbf21555SRichard Lowe.Sh SYNOPSIS
30*bbf21555SRichard Lowe.Pa /etc/default/init
31*bbf21555SRichard Lowe.Pp
32*bbf21555SRichard Lowe.Pa /etc/TIMEZONE
33*bbf21555SRichard Lowe.Sh DESCRIPTION
34*bbf21555SRichard LoweThis file sets the time zone environment variable
35*bbf21555SRichard Lowe.Ev TZ ,
36*bbf21555SRichard Loweand the locale-related environment variables
37*bbf21555SRichard Lowe.Ev LANG ,
38*bbf21555SRichard Lowe.Ev LC_COLLATE ,
39*bbf21555SRichard Lowe.Ev LC_CTYPE ,
40*bbf21555SRichard Lowe.Ev LC_MESSAGES ,
41*bbf21555SRichard Lowe.Ev LC_MONETARY ,
42*bbf21555SRichard Lowe.Ev LC_NUMERIC
43*bbf21555SRichard Loweand
44*bbf21555SRichard Lowe.Ev LC_TIME .
45*bbf21555SRichard Lowe.Pp
46*bbf21555SRichard LoweIt can also be used to set any additional environment variables which should be
47*bbf21555SRichard Lowepresent in all processes started by
48*bbf21555SRichard Lowe.Xr init 8
49*bbf21555SRichard Loweor
50*bbf21555SRichard Lowe.Xr svc.startd 8 ,
51*bbf21555SRichard Loweand in any
52*bbf21555SRichard Lowe.Xr zoneadmd 8
53*bbf21555SRichard Lowedaemons started automatically to support zone operations.
54*bbf21555SRichard Lowe.Pp
55*bbf21555SRichard LoweThe format of the file is a set of tokens of the form:
56*bbf21555SRichard Lowe.Pp
57*bbf21555SRichard Lowe.Dl Ar VAR Ns No \&= Ns Ar value
58*bbf21555SRichard Lowe.Pp
59*bbf21555SRichard Lowewhere
60*bbf21555SRichard Lowe.Ar VAR
61*bbf21555SRichard Loweis an environment variable and
62*bbf21555SRichard Lowe.Ar value
63*bbf21555SRichard Loweis the value assigned to the variable.
64*bbf21555SRichard Lowe.Ar value
65*bbf21555SRichard Lowecan be enclosed in double quotes
66*bbf21555SRichard Lowe.Pq \&"
67*bbf21555SRichard Loweor single quotes
68*bbf21555SRichard Lowe.Pq \&' ,
69*bbf21555SRichard Lowehowever, these quotes cannot be part of the value.
70*bbf21555SRichard LoweNeither
71*bbf21555SRichard Lowe.Ar VAR
72*bbf21555SRichard Lowenor
73*bbf21555SRichard Lowe.Ar value
74*bbf21555SRichard Lowemay contain whitespace.
75*bbf21555SRichard LoweMultiple
76*bbf21555SRichard Lowe.Ar VAR Ns No \&= Ns Ar value
77*bbf21555SRichard Lowepairs can occur on the same line, separated by whitespace or a semicolon
78*bbf21555SRichard Lowe.Pq \&; ,
79*bbf21555SRichard Lowebut, for compatibility with existing software, the
80*bbf21555SRichard Lowe.Ev TZ
81*bbf21555SRichard Lowevariable
82*bbf21555SRichard Lowe.Em must
83*bbf21555SRichard Loweappear on its own line with no leading whitespace.
84*bbf21555SRichard LoweComments are supported; each comment must be on its own line and begin with a
85*bbf21555SRichard Lowehash
86*bbf21555SRichard Lowe.Pq #
87*bbf21555SRichard Lowecharacter.
88*bbf21555SRichard Lowe.Pp
89*bbf21555SRichard LoweIf the
90*bbf21555SRichard Lowe.Ev CMASK
91*bbf21555SRichard Lowevariable is specified, it is not passed to the environment but the value is
92*bbf21555SRichard Loweused to set the initial umask that
93*bbf21555SRichard Lowe.Xr init 8
94*bbf21555SRichard Loweuses and that every other process inherits.
95*bbf21555SRichard LoweThe
96*bbf21555SRichard Lowe.Ev CMASK
97*bbf21555SRichard Lowevalue is specified in octal and must be between 000 and 077 to be accepted; the
98*bbf21555SRichard Lowevalue is silently ignored otherwise.
99*bbf21555SRichard LoweIf the value is missing or cannot be parsed as an octal number, then a value
100*bbf21555SRichard Loweof 0 is assumed.
101*bbf21555SRichard LoweA sequence of valid octal digits followed by other trailing characters will be
102*bbf21555SRichard Lowetreated as if the trailing characters were not present.
103*bbf21555SRichard Lowe.Pp
104*bbf21555SRichard LoweFor
105*bbf21555SRichard Lowe.Xr init 8 ,
106*bbf21555SRichard Lowethe number of environment variables that can be set is limited to 20.
107*bbf21555SRichard Lowe.Pp
108*bbf21555SRichard Lowe.Pa /etc/TIMEZONE
109*bbf21555SRichard Loweis a symbolic link to
110*bbf21555SRichard Lowe.Pa /etc/default/init .
111*bbf21555SRichard LoweThis link exists for compatibility with legacy software, is obsolete, and may
112*bbf21555SRichard Lowebe removed in a future release.
113*bbf21555SRichard Lowe.Sh SEE ALSO
114*bbf21555SRichard Lowe.Xr ctime 3C ,
115*bbf21555SRichard Lowe.Xr environ 7 ,
116*bbf21555SRichard Lowe.Xr init 8 ,
117*bbf21555SRichard Lowe.Xr rtc 8 ,
118*bbf21555SRichard Lowe.Xr svc.startd 8 ,
119*bbf21555SRichard Lowe.Xr zoneadmd 8
120*bbf21555SRichard Lowe.Sh NOTES
121*bbf21555SRichard LoweWhen changing the
122*bbf21555SRichard Lowe.Ev TZ
123*bbf21555SRichard Lowesetting on x86 systems, you must make a corresponding change to the
124*bbf21555SRichard Lowe.Pa /etc/rtc_config
125*bbf21555SRichard Lowefile to account for the new timezone setting.
126*bbf21555SRichard LoweThis can be accomplished by executing the following commands, followed by a
127*bbf21555SRichard Lowereboot, to make the changes take effect:
128*bbf21555SRichard Lowe.Bd -literal -offset indent
129*bbf21555SRichard Lowe# rtc -z zone-name
130*bbf21555SRichard Lowe# rtc -c
131*bbf21555SRichard Lowe.Ed
132*bbf21555SRichard Lowe.Pp
133*bbf21555SRichard Lowewhere
134*bbf21555SRichard Lowe.Ar zone-name
135*bbf21555SRichard Loweis the same name as the
136*bbf21555SRichard Lowe.Ev TZ
137*bbf21555SRichard Lowevariable setting.
138*bbf21555SRichard Lowe.Pp
139*bbf21555SRichard LoweSee
140*bbf21555SRichard Lowe.Xr rtc 8
141*bbf21555SRichard Lowefor more information.
142