|
Lines 29-35
Link Here
|
| 29 |
.Os |
29 |
.Os |
| 30 |
.Sh NAME |
30 |
.Sh NAME |
| 31 |
.Nm adjkerntz |
31 |
.Nm adjkerntz |
| 32 |
.Nd "adjust local time CMOS clock to reflect time zone changes and keep current timezone offset for the kernel" |
32 |
.Nd "adjust the local time CMOS clock to reflect time zone changes and keep the current timezone |
|
|
33 |
offset for the kernel" |
| 33 |
.Sh SYNOPSIS |
34 |
.Sh SYNOPSIS |
| 34 |
.Nm |
35 |
.Nm |
| 35 |
.Fl i |
36 |
.Fl i |
|
Lines 38-61
Link Here
|
| 38 |
.Sh DESCRIPTION |
39 |
.Sh DESCRIPTION |
| 39 |
The |
40 |
The |
| 40 |
.Nm |
41 |
.Nm |
| 41 |
utility maintains the proper relationship between the kernel clock, which |
42 |
utility maintains the proper relationship between the kernel clock, which is |
| 42 |
is always set to UTC, and the CMOS clock, which may be set to local |
43 |
always set to UTC and the CMOS clock, which may be set to local time. |
| 43 |
time. |
|
|
| 44 |
The |
44 |
The |
| 45 |
.Nm |
45 |
.Nm |
| 46 |
utility also informs the kernel about machine timezone shifts to |
46 |
utility also informs the kernel about machine timezone shifts in order to |
| 47 |
maintain proper timestamps for local time file systems such as the MS-DOS |
47 |
maintain proper timestamps for local time file systems such as the MS-DOS |
| 48 |
file system. |
48 |
file system. |
| 49 |
The main purpose of this thing is not general fixing of |
49 |
The main purpose of maintaining these timestamps properly is to keep the |
| 50 |
initially broken MS-DOS file timestamp idea but keeping |
50 |
timestamps of a |
| 51 |
the same timestamps between |
|
|
| 52 |
.Fx |
51 |
.Fx |
| 53 |
MS-DOS file system |
52 |
MS-DOS file system and an MS-DOS operating system synchronized when they are |
| 54 |
and MS-DOS operating system installed on the same |
53 |
installed on the same system rather than generally fixing broken MS-DOS file |
| 55 |
machine. |
54 |
timestamps. |
| 56 |
If the file |
55 |
If the file |
| 57 |
.Pa /etc/wall_cmos_clock |
56 |
.Pa /etc/wall_cmos_clock |
| 58 |
exists, it means that CMOS clock keeps local time (MS-DOS and MS-Windows |
57 |
exists, it means that the CMOS clock keeps local time (MS-DOS and MS-Windows |
| 59 |
compatible mode). |
58 |
compatible mode). |
| 60 |
If that file does not exist, it means that the CMOS clock keeps UTC time. |
59 |
If that file does not exist, it means that the CMOS clock keeps UTC time. |
| 61 |
The |
60 |
The |
|
Lines 64-71
Link Here
|
| 64 |
.Pa machdep.wall_cmos_clock |
63 |
.Pa machdep.wall_cmos_clock |
| 65 |
kernel variable. |
64 |
kernel variable. |
| 66 |
.Pp |
65 |
.Pp |
| 67 |
Adjustments may be needed at system startup and shutdown, and |
66 |
Adjustments may be needed at system startup and shutdown, and whenever a time |
| 68 |
whenever a time zone change occurs. |
67 |
zone change occurs. |
| 69 |
To handle these different situations, |
68 |
To handle these different situations, |
| 70 |
.Nm |
69 |
.Nm |
| 71 |
is invoked in two ways: |
70 |
is invoked in two ways: |
|
Lines 82-92
Link Here
|
| 82 |
utility puts itself into the background. |
81 |
utility puts itself into the background. |
| 83 |
Then, for a local time CMOS clock, |
82 |
Then, for a local time CMOS clock, |
| 84 |
.Nm |
83 |
.Nm |
| 85 |
reads the local time from it |
84 |
reads the local time from it and sets the kernel clock to the |
| 86 |
and sets the kernel clock to the corresponding UTC time. |
85 |
corresponding UTC time. |
| 87 |
The |
86 |
The |
| 88 |
.Nm |
87 |
.Nm |
| 89 |
utility also stores the local time zone offset into the |
88 |
utility also stores the local time zone offset in the |
| 90 |
.Pa machdep.adjkerntz |
89 |
.Pa machdep.adjkerntz |
| 91 |
kernel variable, for use by subsequent invocations of |
90 |
kernel variable, for use by subsequent invocations of |
| 92 |
.Em "'adjkerntz -a'" |
91 |
.Em "'adjkerntz -a'" |
|
Lines 94-101
Link Here
|
| 94 |
.Pp |
93 |
.Pp |
| 95 |
For a local time CMOS clock |
94 |
For a local time CMOS clock |
| 96 |
.Em "'adjkerntz -i'" |
95 |
.Em "'adjkerntz -i'" |
| 97 |
pauses, and remains inactive as a background daemon until it |
96 |
pauses and remains inactive as a background daemon until it receives a |
| 98 |
receives a SIGTERM. |
97 |
SIGTERM. |
| 99 |
The SIGTERM will normally be sent by |
98 |
The SIGTERM will normally be sent by |
| 100 |
.Xr init 8 |
99 |
.Xr init 8 |
| 101 |
when the system leaves multi-user mode (usually, because the system |
100 |
when the system leaves multi-user mode (usually, because the system |
|
Lines 120-126
Link Here
|
| 120 |
calculate a new time zone offset. |
119 |
calculate a new time zone offset. |
| 121 |
It stores the new offset into the |
120 |
It stores the new offset into the |
| 122 |
.Pa machdep.adjkerntz |
121 |
.Pa machdep.adjkerntz |
| 123 |
kernel variable, and updates the wall CMOS clock to the new local time. |
122 |
kernel variable and updates the wall CMOS clock to the new local time. |
| 124 |
If |
123 |
If |
| 125 |
.Em "'adjkerntz -a'" |
124 |
.Em "'adjkerntz -a'" |
| 126 |
was started at a nonexistent time (during a timezone change), it exits |
125 |
was started at a nonexistent time (during a timezone change), it exits |