diff options
author | Marc Kleine-Budde <mkl@pengutronix.de> | 2015-06-19 10:47:37 +0200 |
---|---|---|
committer | Marc Kleine-Budde <mkl@pengutronix.de> | 2015-06-19 11:58:03 +0200 |
commit | 808a7ea2eb535a21ab5170d5334da8dff9b3ad81 (patch) | |
tree | 638b446ff210eb81f88808634e217628ae19070a | |
parent | 26dd4d28c9d65ffcaced8af0c8979a7c451c6413 (diff) | |
download | ptxdist-808a7ea2eb535a21ab5170d5334da8dff9b3ad81.tar.gz ptxdist-808a7ea2eb535a21ab5170d5334da8dff9b3ad81.tar.xz |
chrony: migrate to install_alternative
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
-rw-r--r--[-rwxr-xr-x] | projectroot/usr/bin/chrony_command | 0 | ||||
-rw-r--r--[-rwxr-xr-x] | projectroot/usr/bin/chrony_stat | 0 | ||||
-rw-r--r-- | rules/chrony.in | 32 | ||||
-rw-r--r-- | rules/chrony.make | 31 |
4 files changed, 12 insertions, 51 deletions
diff --git a/projectroot/usr/bin/chrony_command b/projectroot/usr/bin/chrony_command index 03a18d0ae..03a18d0ae 100755..100644 --- a/projectroot/usr/bin/chrony_command +++ b/projectroot/usr/bin/chrony_command diff --git a/projectroot/usr/bin/chrony_stat b/projectroot/usr/bin/chrony_stat index e86d396db..e86d396db 100755..100644 --- a/projectroot/usr/bin/chrony_stat +++ b/projectroot/usr/bin/chrony_stat diff --git a/rules/chrony.in b/rules/chrony.in index 5a79f9339..ccdcb71d0 100644 --- a/rules/chrony.in +++ b/rules/chrony.in @@ -55,34 +55,14 @@ config CHRONY_INSTALL_CHRONY_STAT --short-skew show estimated error, if timesource is currently synced suppress all other servers -menuconfig CHRONY_INSTALL_CONFIG +config CHRONY_INSTALL_CONFIG bool default y - prompt "Install chrony config files " + prompt "Install chrony config files" help - Install /etc/chrony/chrony.conf and /etc/chrony/chony.keys - from a selectable source. - - choice - prompt "Kind of chrony config" - depends on CHRONY_INSTALL_CONFIG - default CHRONY_DEFAULTCONFIG - - config CHRONY_DEFAULTCONFIG - bool - prompt "Use generic" - help - Install generic chrony config files. - See <ptxdist-install>/generic/etc/chrony/ - - config CHRONY_USERCONFIG - bool - prompt "User defined" - help - This uses a user defined chrony config. - PTXdist uses files projectroot/chrony/ - in your local project - endchoice + Install /etc/chrony/chrony.conf and /etc/chrony/chony.keys. + +if CHRONY_INSTALL_CONFIG config CHRONY_DEFAULT_ACCESS_KEY string @@ -102,6 +82,8 @@ config CHRONY_DEFAULT_NTP_SERVER This will set the ntp server for simple configurations. +endif + config CHRONY_STARTSCRIPT bool default y diff --git a/rules/chrony.make b/rules/chrony.make index 140f46857..fac604cf8 100644 --- a/rules/chrony.make +++ b/rules/chrony.make @@ -60,41 +60,20 @@ $(STATEDIR)/chrony.targetinstall: # command helper script ifdef PTXCONF_CHRONY_INSTALL_CHRONY_COMMAND - @$(call install_copy, chrony, 0, 0, 0755, \ - $(PTXDIST_TOPDIR)/generic/usr/bin/chrony_command, \ - /usr/bin/chrony_command) + @$(call install_alternative, chrony, 0, 0, 0755, /usr/bin/chrony_command) endif # chrony stat convenience wrapper ifdef PTXCONF_CHRONY_INSTALL_CHRONY_STAT - @$(call install_copy, chrony, 0, 0, 0755, \ - $(PTXDIST_TOPDIR)/generic/usr/bin/chrony_stat, \ - /usr/bin/chrony_stat) + @$(call install_alternative, chrony, 0, 0, 0755, /usr/bin/chrony_stat) endif - # generic one -ifdef PTXCONF_CHRONY_DEFAULTCONFIG - @$(call install_copy, chrony, 0, 0, 0644, \ - $(PTXDIST_TOPDIR)/generic/etc/chrony/chrony.conf, \ - /etc/chrony/chrony.conf) - @$(call install_copy, chrony, 0, 0, 0600, \ - $(PTXDIST_TOPDIR)/generic/etc/chrony/chrony.keys, \ - /etc/chrony/chrony.keys) -endif - -# users one -ifdef PTXCONF_CHRONY_USERCONFIG - @$(call install_copy, chrony, 0, 0, 0644, \ - $(PTXDIST_WORKSPACE)/projectroot/etc/chrony/chrony.conf, \ - /etc/chrony/chrony.conf) - @$(call install_copy, chrony, 0, 0, 0600, \ - $(PTXDIST_WORKSPACE)/projectroot/etc/chrony/chrony.keys, \ - /etc/chrony/chrony.keys) -endif +ifdef PTXCONF_CHRONY_INSTALL_CONFIG + @$(call install_alternative, chrony, 0, 0, 0644, /etc/chrony/chrony.conf) + @$(call install_alternative, chrony, 0, 0, 0600, /etc/chrony/chrony.keys) # modify placeholders with data from configuration -ifdef PTXCONF_CHRONY_INSTALL_CONFIG @$(call install_replace, chrony, /etc/chrony/chrony.conf, \ @UNCONFIGURED_CHRONY_SERVER_IP@, $(PTXCONF_CHRONY_DEFAULT_NTP_SERVER)) |