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