util-linux/hwclock
Alain Guibert 8f5b978e53 hwclock: do not create a zero adjfile
When hwclock --hctosys is started very early during the system startup,
with / still mounted read-only, and there was no /etc/adjtime file,
hwclock fails creating a default adjfile full of zeroes, and prints an
error message. I believe that such zero adjfile is not necessary,
because it means exactly the same as no adjfile at all.

The attached patch prevents creation of a zero adjfile, of course unless
something gets changed (this never happens during a --hctosys).

Signed-off-by: Alain Guibert <alguibert+ulng@free.fr>
2007-10-26 01:02:44 +02:00
..
Makefile.am build-sys: do not use wildcards in EXTRA_DIST 2007-05-16 11:43:30 +02:00
README.hwclock Imported from util-linux-2.10s tarball. 2006-12-07 00:25:44 +01:00
clock-ppc.c Imported from util-linux-2.11b tarball. 2006-12-07 00:25:46 +01:00
clock.h hwclock: remove tailing white-spaces and clean up clock.h 2007-03-21 15:05:58 +01:00
cmos.c hwclock: make ggc happy and check return values from fgets, read and write 2007-03-21 16:21:34 +01:00
hwclock.8 man pages: add "AVAILABILITY" section 2007-07-03 01:17:04 +02:00
hwclock.c hwclock: do not create a zero adjfile 2007-10-26 01:02:44 +02:00
kd.c hwclock: remove tailing white-spaces and clean up clock.h 2007-03-21 15:05:58 +01:00
rtc.c hwclock: fix --rtc option 2007-09-20 13:40:14 +02:00

README.hwclock

Hwclock is a program that runs under Linux and sets and queries the 
Hardware Clock, which is often called the Real Time Clock, RTC, or
CMOS clock.

Sometimes, you need to install hwclock setuid root.  If you want users
other than the superuser to be able to display the clock value using the
direct ISA I/O method, install it setuid root.  If you have the /dev/rtc
interface on your system or are on a non-ISA system, there's probably
no need for users to use the direct ISA I/O method, so don't bother.

To install setuid root, do something like this:

  chmod a=rx,u=s /sbin/hwclock

In any case, hwclock will not allow you to set anything unless you have
the superuser _real_ uid.  (This is restriction is not necessary if you
haven't installed setuid root, but it's there for now).

You may want to preformat and/or compress the man page before installing.

If you want to build hwclock, just cd to the source directory and invoke
make with no parameters.

hwclock calls option processing routines in the libsshopt library,
which is part of Sverre H. Huseby's "shhopt" package. You
can find a more authoritative copy of this package on metalab
(ftp://metalab.unc.edu/pub/Linux/libs/shhopt-X.Y).