build-sys: support ./configure ADJTIME_PATH=
.. to override the default /etc/adjtime path. Reported-by: Bruce Dubbs <bruce.dubbs@gmail.com> Signed-off-by: Karel Zak <kzak@redhat.com>
This commit is contained in:
parent
ae2f2f5617
commit
2ad2196349
|
@ -117,6 +117,7 @@ edit_cmd = sed \
|
||||||
-e 's|@usrbin_execdir[@]|$(usrbin_execdir)|g' \
|
-e 's|@usrbin_execdir[@]|$(usrbin_execdir)|g' \
|
||||||
-e 's|@usrsbin_execdir[@]|$(usrsbin_execdir)|g' \
|
-e 's|@usrsbin_execdir[@]|$(usrsbin_execdir)|g' \
|
||||||
-e 's|@VERSION[@]|$(VERSION)|g' \
|
-e 's|@VERSION[@]|$(VERSION)|g' \
|
||||||
|
-e 's|@ADJTIME_PATH[@]|$(ADJTIME_PATH)|g' \
|
||||||
-e 's|@LIBUUID_VERSION[@]|$(LIBUUID_VERSION)|g' \
|
-e 's|@LIBUUID_VERSION[@]|$(LIBUUID_VERSION)|g' \
|
||||||
-e 's|@LIBMOUNT_VERSION[@]|$(LIBMOUNT_VERSION)|g' \
|
-e 's|@LIBMOUNT_VERSION[@]|$(LIBMOUNT_VERSION)|g' \
|
||||||
-e 's|@LIBSMARTCOLS_VERSION[@]|$(LIBSMARTCOLS_VERSION)|g' \
|
-e 's|@LIBSMARTCOLS_VERSION[@]|$(LIBSMARTCOLS_VERSION)|g' \
|
||||||
|
|
|
@ -1776,6 +1776,12 @@ AC_ARG_VAR([SOLIB_CFLAGS],
|
||||||
AC_ARG_VAR([SOLIB_LDFLAGS],
|
AC_ARG_VAR([SOLIB_LDFLAGS],
|
||||||
[LDFLAGS used for shared libraries])
|
[LDFLAGS used for shared libraries])
|
||||||
|
|
||||||
|
AC_ARG_VAR([ADJTIME_PATH],
|
||||||
|
[Path to hwclock adjtime file, default /etc/adjtime])
|
||||||
|
AS_IF([test "x$ADJTIME_PATH" = x], [ADJTIME_PATH="/etc/adjtime"])
|
||||||
|
AC_DEFINE_UNQUOTED([CONFIG_ADJTIME_PATH], "$ADJTIME_PATH", [Path to hwclock adjtime file])
|
||||||
|
|
||||||
|
|
||||||
LIBS=""
|
LIBS=""
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -150,7 +150,11 @@
|
||||||
#define _PATH_DEV_BYPARTUUID "/dev/disk/by-partuuid"
|
#define _PATH_DEV_BYPARTUUID "/dev/disk/by-partuuid"
|
||||||
|
|
||||||
/* hwclock paths */
|
/* hwclock paths */
|
||||||
|
#ifdef CONFIG_ADJTIME_PATH
|
||||||
|
# define _PATH_ADJTIME CONFIG_ADJTIME_PATH
|
||||||
|
#else
|
||||||
# define _PATH_ADJTIME "/etc/adjtime"
|
# define _PATH_ADJTIME "/etc/adjtime"
|
||||||
|
#endif
|
||||||
|
|
||||||
#define _PATH_LASTDATE "/var/lib/lastdate"
|
#define _PATH_LASTDATE "/var/lib/lastdate"
|
||||||
#ifdef __ia64__
|
#ifdef __ia64__
|
||||||
|
|
|
@ -20,3 +20,5 @@ sparc64.8
|
||||||
sparc.8
|
sparc.8
|
||||||
uname26.8
|
uname26.8
|
||||||
x86_64.8
|
x86_64.8
|
||||||
|
hwclock.8
|
||||||
|
rtcwake.8
|
||||||
|
|
|
@ -104,6 +104,7 @@ endif
|
||||||
if BUILD_RTCWAKE
|
if BUILD_RTCWAKE
|
||||||
usrsbin_exec_PROGRAMS += rtcwake
|
usrsbin_exec_PROGRAMS += rtcwake
|
||||||
dist_man_MANS += sys-utils/rtcwake.8
|
dist_man_MANS += sys-utils/rtcwake.8
|
||||||
|
PATHFILES += sys-utils/rtcwake.8
|
||||||
rtcwake_SOURCES = sys-utils/rtcwake.c
|
rtcwake_SOURCES = sys-utils/rtcwake.c
|
||||||
rtcwake_LDADD = $(LDADD) libcommon.la
|
rtcwake_LDADD = $(LDADD) libcommon.la
|
||||||
endif
|
endif
|
||||||
|
@ -334,6 +335,7 @@ endif
|
||||||
if BUILD_HWCLOCK
|
if BUILD_HWCLOCK
|
||||||
sbin_PROGRAMS += hwclock
|
sbin_PROGRAMS += hwclock
|
||||||
dist_man_MANS += sys-utils/hwclock.8
|
dist_man_MANS += sys-utils/hwclock.8
|
||||||
|
PATHFILES += sys-utils/hwclock.8
|
||||||
hwclock_SOURCES = \
|
hwclock_SOURCES = \
|
||||||
sys-utils/hwclock.c \
|
sys-utils/hwclock.c \
|
||||||
sys-utils/hwclock.h \
|
sys-utils/hwclock.h \
|
||||||
|
|
|
@ -193,7 +193,7 @@ exist, the default is UTC time.
|
||||||
.TP
|
.TP
|
||||||
.B \-\-noadjfile
|
.B \-\-noadjfile
|
||||||
Disables the facilities provided by
|
Disables the facilities provided by
|
||||||
.IR /etc/adjtime .
|
.IR @ADJTIME_PATH@ .
|
||||||
.B hwclock
|
.B hwclock
|
||||||
will not read nor write to that file with this option. Either
|
will not read nor write to that file with this option. Either
|
||||||
.B \-\-utc
|
.B \-\-utc
|
||||||
|
@ -203,7 +203,7 @@ must be specified when using this option.
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
.BI \-\-adjfile= filename
|
.BI \-\-adjfile= filename
|
||||||
Overrides the default /etc/adjtime.
|
Overrides the default @ADJTIME_PATH@.
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
.BR \-f , \ \-\-rtc=\fIfilename\fB
|
.BR \-f , \ \-\-rtc=\fIfilename\fB
|
||||||
|
@ -493,7 +493,7 @@ systematic drift.
|
||||||
It works like this:
|
It works like this:
|
||||||
.B hwclock
|
.B hwclock
|
||||||
keeps a file,
|
keeps a file,
|
||||||
.IR /etc/adjtime ,
|
.IR @ADJTIME_PATH@ ,
|
||||||
that keeps some historical information. This is called the adjtime file.
|
that keeps some historical information. This is called the adjtime file.
|
||||||
.PP
|
.PP
|
||||||
Suppose you start with no adjtime file. You issue a
|
Suppose you start with no adjtime file. You issue a
|
||||||
|
@ -628,7 +628,7 @@ are supported by the hardware.
|
||||||
.I TZ
|
.I TZ
|
||||||
|
|
||||||
.SH FILES
|
.SH FILES
|
||||||
.I /etc/adjtime
|
.I @ADJTIME_PATH@
|
||||||
.I /usr/share/zoneinfo/
|
.I /usr/share/zoneinfo/
|
||||||
.RI ( /usr/lib/zoneinfo
|
.RI ( /usr/lib/zoneinfo
|
||||||
on old systems)
|
on old systems)
|
|
@ -61,17 +61,17 @@ Specifies an alternative path to the adjust file.
|
||||||
.TP
|
.TP
|
||||||
\fB-a\fP | \fB--auto\fP
|
\fB-a\fP | \fB--auto\fP
|
||||||
Reads the clock mode (whether the hardware clock is set to UTC or local time)
|
Reads the clock mode (whether the hardware clock is set to UTC or local time)
|
||||||
from \fI/etc/adjtime\fP. That's the location where the
|
from \fIadjtime\fP file. That's the location where the
|
||||||
.BR hwclock (8)
|
.BR hwclock (8)
|
||||||
stores that information. This is the default.
|
stores that information. This is the default.
|
||||||
.TP
|
.TP
|
||||||
\fB-l\fP | \fB--local\fP
|
\fB-l\fP | \fB--local\fP
|
||||||
Assumes that the hardware clock is set to local time, regardless of the
|
Assumes that the hardware clock is set to local time, regardless of the
|
||||||
contents of \fI/etc/adjtime\fP.
|
contents of \fIadjtime\fP file.
|
||||||
.TP
|
.TP
|
||||||
\fB-u\fP | \fB--utc\fP
|
\fB-u\fP | \fB--utc\fP
|
||||||
Assumes that the hardware clock is set to UTC (Universal Time Coordinated),
|
Assumes that the hardware clock is set to UTC (Universal Time Coordinated),
|
||||||
regardless of the contents of \fI/etc/adjtime\fP.
|
regardless of the contents of \fIadjtime\fP file.
|
||||||
.TP
|
.TP
|
||||||
\fB-d\fP \fIdevice\fP | \fB--device\fP \fIdevice\fP
|
\fB-d\fP \fIdevice\fP | \fB--device\fP \fIdevice\fP
|
||||||
Uses \fIdevice\fP instead of \fIrtc0\fP as realtime clock. This option
|
Uses \fIdevice\fP instead of \fIrtc0\fP as realtime clock. This option
|
||||||
|
@ -132,6 +132,8 @@ Print alarm information in format: "alarm: off|on <time>".
|
||||||
The time is in ctime() output format, e.g. "alarm: on Tue Nov 16 04:48:45 2010".
|
The time is in ctime() output format, e.g. "alarm: on Tue Nov 16 04:48:45 2010".
|
||||||
.RE
|
.RE
|
||||||
.PP
|
.PP
|
||||||
|
.SH FILES
|
||||||
|
.I @ADJTIME_PATH@
|
||||||
.SH NOTES
|
.SH NOTES
|
||||||
Some PC systems can't currently exit sleep states such as \fImem\fP
|
Some PC systems can't currently exit sleep states such as \fImem\fP
|
||||||
using only the kernel code accessed by this driver.
|
using only the kernel code accessed by this driver.
|
Loading…
Reference in New Issue