Igor Sarkisov | c9d10aa | 2020-10-06 15:22:51 -0700 | [diff] [blame] | 1 | Hwclock is a program that runs under Linux and sets and queries the |
| 2 | Hardware Clock, which is often called the Real Time Clock, RTC, or |
| 3 | CMOS clock. |
| 4 | |
| 5 | Sometimes, you need to install hwclock setuid root. If you want users |
| 6 | other than the superuser to be able to display the clock value using the |
| 7 | direct ISA I/O method, install it setuid root. If you have the /dev/rtc |
| 8 | interface on your system or are on a non-ISA system, there's probably |
| 9 | no need for users to use the direct ISA I/O method, so don't bother. |
| 10 | |
| 11 | To install setuid root, do something like this: |
| 12 | |
| 13 | chmod a=rx,u=s /sbin/hwclock |
| 14 | |
| 15 | In any case, hwclock will not allow you to set anything unless you have |
| 16 | the superuser _real_ uid. (This is restriction is not necessary if you |
| 17 | haven't installed setuid root, but it's there for now). |
| 18 | |
| 19 | You may want to preformat and/or compress the man page before installing. |
| 20 | |
| 21 | If you want to build hwclock, just cd to the source directory and invoke |
| 22 | make with no parameters. |
| 23 | |
| 24 | hwclock calls option processing routines in the libsshopt library, |
| 25 | which is part of Sverre H. Huseby's "shhopt" package. You |
| 26 | can find a more authoritative copy of this package on metalab |
| 27 | (ftp://metalab.unc.edu/pub/Linux/libs/shhopt-X.Y). |