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