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