configure: add options to set default pidfile and rtcdevice
This commit is contained in:
parent
f63e414024
commit
98ba4ce4d5
4 changed files with 22 additions and 4 deletions
4
conf.c
4
conf.c
|
@ -333,8 +333,8 @@ CNF_Initialise(int r)
|
||||||
dumpdir = Strdup(".");
|
dumpdir = Strdup(".");
|
||||||
logdir = Strdup(".");
|
logdir = Strdup(".");
|
||||||
bind_cmd_path = Strdup(DEFAULT_COMMAND_SOCKET);
|
bind_cmd_path = Strdup(DEFAULT_COMMAND_SOCKET);
|
||||||
pidfile = Strdup("/var/run/chronyd.pid");
|
pidfile = Strdup(DEFAULT_PID_FILE);
|
||||||
rtc_device = Strdup("/dev/rtc");
|
rtc_device = Strdup(DEFAULT_RTC_DEVICE);
|
||||||
hwclock_file = Strdup(DEFAULT_HWCLOCK_FILE);
|
hwclock_file = Strdup(DEFAULT_HWCLOCK_FILE);
|
||||||
user = Strdup(DEFAULT_USER);
|
user = Strdup(DEFAULT_USER);
|
||||||
}
|
}
|
||||||
|
|
14
configure
vendored
14
configure
vendored
|
@ -106,6 +106,8 @@ For better control, use the options below.
|
||||||
since 1970-01-01 [50*365 days ago]
|
since 1970-01-01 [50*365 days ago]
|
||||||
--with-user=USER Specify default chronyd user [root]
|
--with-user=USER Specify default chronyd user [root]
|
||||||
--with-hwclockfile=PATH Specify default path to hwclock(8) adjtime file
|
--with-hwclockfile=PATH Specify default path to hwclock(8) adjtime file
|
||||||
|
--with-pidfile=PATH Specify default pidfile [/var/run/chronyd.pid]
|
||||||
|
--with-rtcdevice=PATH Specify default path to RTC device [/dev/rtc]
|
||||||
--with-sendmail=PATH Path to sendmail binary [/usr/lib/sendmail]
|
--with-sendmail=PATH Path to sendmail binary [/usr/lib/sendmail]
|
||||||
--enable-debug Enable debugging support
|
--enable-debug Enable debugging support
|
||||||
|
|
||||||
|
@ -221,6 +223,8 @@ feat_ntp_signd=0
|
||||||
ntp_era_split=""
|
ntp_era_split=""
|
||||||
default_user="root"
|
default_user="root"
|
||||||
default_hwclockfile=""
|
default_hwclockfile=""
|
||||||
|
default_pidfile="/var/run/chronyd.pid"
|
||||||
|
default_rtcdevice="/dev/rtc"
|
||||||
mail_program="/usr/lib/sendmail"
|
mail_program="/usr/lib/sendmail"
|
||||||
|
|
||||||
for option
|
for option
|
||||||
|
@ -337,6 +341,12 @@ do
|
||||||
--with-hwclockfile=* )
|
--with-hwclockfile=* )
|
||||||
default_hwclockfile=`echo $option | sed -e 's/^.*=//;'`
|
default_hwclockfile=`echo $option | sed -e 's/^.*=//;'`
|
||||||
;;
|
;;
|
||||||
|
--with-pidfile=* )
|
||||||
|
default_pidfile=`echo $option | sed -e 's/^.*=//;'`
|
||||||
|
;;
|
||||||
|
--with-rtcdevice=* )
|
||||||
|
default_rtcdevice=`echo $option | sed -e 's/^.*=//;'`
|
||||||
|
;;
|
||||||
--with-sendmail=* )
|
--with-sendmail=* )
|
||||||
mail_program=`echo $option | sed -e 's/^.*=//;'`
|
mail_program=`echo $option | sed -e 's/^.*=//;'`
|
||||||
;;
|
;;
|
||||||
|
@ -856,6 +866,8 @@ fi
|
||||||
|
|
||||||
add_def DEFAULT_CONF_FILE "\"$SYSCONFDIR/chrony.conf\""
|
add_def DEFAULT_CONF_FILE "\"$SYSCONFDIR/chrony.conf\""
|
||||||
add_def DEFAULT_HWCLOCK_FILE "\"$default_hwclockfile\""
|
add_def DEFAULT_HWCLOCK_FILE "\"$default_hwclockfile\""
|
||||||
|
add_def DEFAULT_PID_FILE "\"$default_pidfile\""
|
||||||
|
add_def DEFAULT_RTC_DEVICE "\"$default_rtcdevice\""
|
||||||
add_def DEFAULT_USER "\"$default_user\""
|
add_def DEFAULT_USER "\"$default_user\""
|
||||||
add_def DEFAULT_COMMAND_SOCKET "\"$CHRONYSOCKDIR/chronyd.sock\""
|
add_def DEFAULT_COMMAND_SOCKET "\"$CHRONYSOCKDIR/chronyd.sock\""
|
||||||
add_def MAIL_PROGRAM "\"$mail_program\""
|
add_def MAIL_PROGRAM "\"$mail_program\""
|
||||||
|
@ -898,6 +910,8 @@ do
|
||||||
s%@CHRONYSOCKDIR@%${CHRONYSOCKDIR}%;\
|
s%@CHRONYSOCKDIR@%${CHRONYSOCKDIR}%;\
|
||||||
s%@CHRONYVARDIR@%${CHRONYVARDIR}%;\
|
s%@CHRONYVARDIR@%${CHRONYVARDIR}%;\
|
||||||
s%@DEFAULT_HWCLOCK_FILE@%${default_hwclockfile}%;\
|
s%@DEFAULT_HWCLOCK_FILE@%${default_hwclockfile}%;\
|
||||||
|
s%@DEFAULT_PID_FILE@%${default_pidfile}%;\
|
||||||
|
s%@DEFAULT_RTC_DEVICE@%${default_rtcdevice}%;\
|
||||||
s%@DEFAULT_USER@%${default_user}%;\
|
s%@DEFAULT_USER@%${default_user}%;\
|
||||||
s%@CHRONY_VERSION@%${CHRONY_VERSION}%;" \
|
s%@CHRONY_VERSION@%${CHRONY_VERSION}%;" \
|
||||||
< ${f}.in > $f
|
< ${f}.in > $f
|
||||||
|
|
|
@ -18,12 +18,16 @@ CHRONYVARDIR = @CHRONYVARDIR@
|
||||||
CHRONY_VERSION = @CHRONY_VERSION@
|
CHRONY_VERSION = @CHRONY_VERSION@
|
||||||
DEFAULT_USER = @DEFAULT_USER@
|
DEFAULT_USER = @DEFAULT_USER@
|
||||||
DEFAULT_HWCLOCK_FILE = @DEFAULT_HWCLOCK_FILE@
|
DEFAULT_HWCLOCK_FILE = @DEFAULT_HWCLOCK_FILE@
|
||||||
|
DEFAULT_PID_FILE = @DEFAULT_PID_FILE@
|
||||||
|
DEFAULT_RTC_DEVICE = @DEFAULT_RTC_DEVICE@
|
||||||
|
|
||||||
SED_COMMANDS = "s%\@SYSCONFDIR\@%$(SYSCONFDIR)%g;\
|
SED_COMMANDS = "s%\@SYSCONFDIR\@%$(SYSCONFDIR)%g;\
|
||||||
s%\@BINDIR\@%$(BINDIR)%g;\
|
s%\@BINDIR\@%$(BINDIR)%g;\
|
||||||
s%\@SBINDIR\@%$(SBINDIR)%g;\
|
s%\@SBINDIR\@%$(SBINDIR)%g;\
|
||||||
s%\@CHRONY_VERSION\@%$(CHRONY_VERSION)%g;\
|
s%\@CHRONY_VERSION\@%$(CHRONY_VERSION)%g;\
|
||||||
s%\@DEFAULT_HWCLOCK_FILE\@%$(DEFAULT_HWCLOCK_FILE)%g;\
|
s%\@DEFAULT_HWCLOCK_FILE\@%$(DEFAULT_HWCLOCK_FILE)%g;\
|
||||||
|
s%\@DEFAULT_PID_FILE\@%$(DEFAULT_PID_FILE)%g;\
|
||||||
|
s%\@DEFAULT_RTC_DEVICE\@%$(DEFAULT_RTC_DEVICE)%g;\
|
||||||
s%\@DEFAULT_USER\@%$(DEFAULT_USER)%g;\
|
s%\@DEFAULT_USER\@%$(DEFAULT_USER)%g;\
|
||||||
s%\@CHRONYSOCKDIR\@%$(CHRONYSOCKDIR)%g;\
|
s%\@CHRONYSOCKDIR\@%$(CHRONYSOCKDIR)%g;\
|
||||||
s%\@CHRONYVARDIR\@%$(CHRONYVARDIR)%g;"
|
s%\@CHRONYVARDIR\@%$(CHRONYVARDIR)%g;"
|
||||||
|
|
|
@ -1375,7 +1375,7 @@ This would set the threshold error to 30 seconds.
|
||||||
|
|
||||||
[[rtcdevice]]*rtcdevice* _device_::
|
[[rtcdevice]]*rtcdevice* _device_::
|
||||||
The *rtcdevice* directive sets the path to the device file for accessing the
|
The *rtcdevice* directive sets the path to the device file for accessing the
|
||||||
RTC. The default path is _/dev/rtc_.
|
RTC. The default path is _@DEFAULT_RTC_DEVICE@_.
|
||||||
|
|
||||||
[[rtcfile]]*rtcfile* _file_::
|
[[rtcfile]]*rtcfile* _file_::
|
||||||
The *rtcfile* directive defines the name of the file in which *chronyd* can
|
The *rtcfile* directive defines the name of the file in which *chronyd* can
|
||||||
|
@ -1782,7 +1782,7 @@ ntpsigndsocket /var/lib/samba/ntp_signd
|
||||||
[[pidfile]]*pidfile* _file_::
|
[[pidfile]]*pidfile* _file_::
|
||||||
*chronyd* always writes its process ID (PID) to a file, and checks this file on
|
*chronyd* always writes its process ID (PID) to a file, and checks this file on
|
||||||
startup to see if another *chronyd* may already be running on the system. By
|
startup to see if another *chronyd* may already be running on the system. By
|
||||||
default, the file used is _/var/run/chronyd.pid_. The *pidfile* directive
|
default, the file used is _@DEFAULT_PID_FILE@_. The *pidfile* directive
|
||||||
allows the name to be changed, e.g.:
|
allows the name to be changed, e.g.:
|
||||||
+
|
+
|
||||||
----
|
----
|
||||||
|
|
Loading…
Reference in a new issue