summaryrefslogtreecommitdiff
path: root/usr/src
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src')
-rw-r--r--usr/src/cmd/bnu/uucico.c5
-rw-r--r--usr/src/cmd/init/init.dfl8
-rw-r--r--usr/src/cmd/listen/listen.c16
-rw-r--r--usr/src/cmd/login/login.c10
-rw-r--r--usr/src/cmd/tsol/misc/txzonemgr.sh3
-rw-r--r--usr/src/man/man4/Makefile2
-rw-r--r--usr/src/man/man4/init.4 (renamed from usr/src/man/man4/TIMEZONE.4)10
-rw-r--r--usr/src/pkg/manifests/SUNWcs.man4.inc2
8 files changed, 30 insertions, 26 deletions
diff --git a/usr/src/cmd/bnu/uucico.c b/usr/src/cmd/bnu/uucico.c
index 76a0aa3ba4..f751d0037d 100644
--- a/usr/src/cmd/bnu/uucico.c
+++ b/usr/src/cmd/bnu/uucico.c
@@ -19,6 +19,9 @@
* CDDL HEADER END
*/
/*
+ * Copyright 2014 Garrett D'Amore
+ */
+/*
* Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -917,7 +920,7 @@ setTZ()
int i;
extern int fclose(), strncmp();
- if ( (tzfp = fopen("/etc/TIMEZONE","r")) == (FILE *)NULL )
+ if ( (tzfp = fopen("/etc/default/init","r")) == (FILE *)NULL )
return;
while ( (bp = fgets(buf,LINELEN,tzfp)) != (char *)NULL ) {
while ( isspace(*bp) )
diff --git a/usr/src/cmd/init/init.dfl b/usr/src/cmd/init/init.dfl
index afeae792cd..371b48becc 100644
--- a/usr/src/cmd/init/init.dfl
+++ b/usr/src/cmd/init/init.dfl
@@ -22,12 +22,8 @@
#
# CDDL HEADER END
#
-#ident "%Z%%M% %I% %E% SMI"
-#
-# This file is /etc/default/init. /etc/TIMEZONE is a symlink to this file.
-# This file looks like a shell script, but it is not. To maintain
-# compatibility with old versions of /etc/TIMEZONE, some shell constructs
-# (i.e., export commands) are allowed in this file, but are ignored.
+# This file is /etc/default/init.
+# This file looks like a shell script, but it is not.
#
# Lines of this file should be of the form VAR=value, where VAR is one of
# TZ, LANG, CMASK, or any of the LC_* environment variables. value may
diff --git a/usr/src/cmd/listen/listen.c b/usr/src/cmd/listen/listen.c
index d210c44e9d..55ce8a32a1 100644
--- a/usr/src/cmd/listen/listen.c
+++ b/usr/src/cmd/listen/listen.c
@@ -21,6 +21,9 @@
*/
/*
+ * Copyright 2014 Garrett D'Amore
+ */
+/*
* Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -28,8 +31,6 @@
/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
/* All Rights Reserved */
-#pragma ident "%Z%%M% %I% %E% SMI"
-
/*
* Network Listener Process
*
@@ -157,7 +158,7 @@ static char *usage = "Usage: listen [ -m minor_prefix ] network_device";
static char *nopmtag = "Fatal error: Unable to get PMTAG from environment";
static char tzenv[BUFSIZ];
-#define TIMEZONE "/etc/TIMEZONE"
+#define TZFILE "/etc/default/init"
#define TZSTR "TZ="
void check_sac_mesg(); /* routine to process messages from sac */
@@ -300,7 +301,7 @@ main(int argc, char **argv)
*/
if (getenv("TZ") == NULL) {
- fp = fopen(TIMEZONE, "r");
+ fp = fopen(TZFILE, "r");
if (fp) {
while (fgets(tzenv, BUFSIZ, fp)) {
if (tzenv[strlen(tzenv) - 1] == '\n')
@@ -313,7 +314,8 @@ main(int argc, char **argv)
fclose(fp);
}
else {
- sprintf(scratch, "couldn't open %s, default to GMT", TIMEZONE);
+ sprintf(scratch, "couldn't open %s, default to GMT",
+ TZFILE);
logmessage(scratch);
}
}
@@ -1571,8 +1573,8 @@ char *s;
delim = *p++;
for (;;) {
if (*p == '\0') {
- /* etc/TIMEZONE ill-formed, go without TZ */
- sprintf(scratch, "%s ill-formed", TIMEZONE);
+ /* etc/default/init ill-formed, go without TZ */
+ sprintf(scratch, "%s ill-formed", TZFILE);
logmessage(scratch);
strcpy(s, "TZ=");
return(s);
diff --git a/usr/src/cmd/login/login.c b/usr/src/cmd/login/login.c
index 50fa5c05b9..af665fec75 100644
--- a/usr/src/cmd/login/login.c
+++ b/usr/src/cmd/login/login.c
@@ -2213,7 +2213,7 @@ establish_user_environment(char **renvp)
/*
* There are three places to get timezone info. init.c sets
- * TZ if the file /etc/TIMEZONE contains a value for TZ.
+ * TZ if the file /etc/default/init contains a value for TZ.
* login.c looks in the file /etc/default/login for a
* variable called TIMEZONE being set. If TIMEZONE has a
* value, TZ is set to that value; no environment variable
@@ -2221,15 +2221,15 @@ establish_user_environment(char **renvp)
* work to set TZ, then the library routines will default
* to using the file /usr/lib/locale/TZ/localtime.
*
- * There is a priority set up here. If /etc/TIMEZONE has
+ * There is a priority set up here. If /etc/default/init has
* a value for TZ, that value remains top priority. If the
* file /etc/default/login has TIMEZONE set, that has second
* highest priority not overriding the value of TZ in
- * /etc/TIMEZONE. The reason for this priority is that the
- * file /etc/TIMEZONE is supposed to be sourced by
+ * /etc/default/init. The reason for this priority is that the
+ * file /etc/default/init is supposed to be sourced by
* /etc/profile. We are doing the "sourcing" prematurely in
* init.c. Additionally, a login C shell doesn't source the
- * file /etc/profile thus not sourcing /etc/TIMEZONE thus not
+ * file /etc/profile thus not sourcing /etc/default/init thus not
* allowing an adminstrator to globally set TZ for all users
*/
if (Def_tz != NULL) /* Is there a TZ from defaults/login? */
diff --git a/usr/src/cmd/tsol/misc/txzonemgr.sh b/usr/src/cmd/tsol/misc/txzonemgr.sh
index ab0cd7d3f5..179a0e8170 100644
--- a/usr/src/cmd/tsol/misc/txzonemgr.sh
+++ b/usr/src/cmd/tsol/misc/txzonemgr.sh
@@ -20,6 +20,7 @@
# CDDL HEADER END
#
# Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
+# Copyright 2014 Garrett D'Amore
#
#
@@ -444,7 +445,7 @@ initialize() {
locale="C"
fi
print "system_locale=$locale" >> ${SYSIDCFG}
- timezone=$(grep "^TZ" /etc/TIMEZONE|cut -d "=" -f2)
+ timezone=$(grep "^TZ" /etc/default/init|cut -d "=" -f2)
print "timezone=$timezone" >> ${SYSIDCFG}
print "terminal=vt100" >> ${SYSIDCFG}
rootpwd=$(grep "^root:" /etc/shadow|cut -d : -f2)
diff --git a/usr/src/man/man4/Makefile b/usr/src/man/man4/Makefile
index 0b3816cf7f..8df0755bfb 100644
--- a/usr/src/man/man4/Makefile
+++ b/usr/src/man/man4/Makefile
@@ -20,7 +20,6 @@ MANSECT= 4
_MANFILES= Intro.4 \
NISLDAPmapping.4 \
- TIMEZONE.4 \
a.out.4 \
admin.4 \
alias.4 \
@@ -92,6 +91,7 @@ _MANFILES= Intro.4 \
ike.preshared.4 \
inet_type.4 \
inetd.conf.4 \
+ init.4 \
init.d.4 \
inittab.4 \
ipaddrsel.conf.4 \
diff --git a/usr/src/man/man4/TIMEZONE.4 b/usr/src/man/man4/init.4
index 579353f0eb..c9f301a8c0 100644
--- a/usr/src/man/man4/TIMEZONE.4
+++ b/usr/src/man/man4/init.4
@@ -1,16 +1,16 @@
'\" te
+.\" 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]
-.TH TIMEZONE 4 "Jun 26, 2003"
+.TH init 4 "Mar 15, 2014"
.SH NAME
-TIMEZONE \- set default system time zone and locale
+init \- set default system time zone and locale
.SH SYNOPSIS
.LP
.nf
-\fB/etc/TIMEZONE\fR
\fB/etc/default/init\fR
.fi
@@ -23,7 +23,9 @@ locale-related environment variables \fBLANG\fR, \fBLC_COLLATE\fR,
\fBLC_TIME\fR.
.sp
.LP
-\fB/etc/TIMEZONE\fR is a symbolic link to \fB/etc/default/init\fR.
+\fB/etc/TIMEZONE\fR is a symbolic link to \fB/etc/default/init\fR. This
+link exists for compatibility with legacy software, is obsolete, and may
+be removed in a future release.
.sp
.LP
The number of environment variables that can be set from
diff --git a/usr/src/pkg/manifests/SUNWcs.man4.inc b/usr/src/pkg/manifests/SUNWcs.man4.inc
index 743590118f..2dce05b2fd 100644
--- a/usr/src/pkg/manifests/SUNWcs.man4.inc
+++ b/usr/src/pkg/manifests/SUNWcs.man4.inc
@@ -15,7 +15,6 @@
#
file path=usr/share/man/man4/Intro.4
-file path=usr/share/man/man4/TIMEZONE.4
file path=usr/share/man/man4/audit.log.4
file path=usr/share/man/man4/audit_class.4
file path=usr/share/man/man4/audit_control.4
@@ -49,6 +48,7 @@ file path=usr/share/man/man4/ike.config.4
file path=usr/share/man/man4/ike.preshared.4
file path=usr/share/man/man4/inet_type.4
file path=usr/share/man/man4/inetd.conf.4
+file path=usr/share/man/man4/init.4
file path=usr/share/man/man4/init.d.4
file path=usr/share/man/man4/inittab.4
file path=usr/share/man/man4/ipaddrsel.conf.4