diff options
author | Bjoern Buerger <b.buerger@pengutronix.de> | 2007-03-13 16:49:19 +0000 |
---|---|---|
committer | Bjoern Buerger <b.buerger@pengutronix.de> | 2007-03-13 16:49:19 +0000 |
commit | c411ae70feff21b67015dee7e1507fe61fb02a58 (patch) | |
tree | e60b7b0647d0cce4f2e25966491f17ad56243eed /rules | |
parent | 3fd560f93b3973b85a26bd68293d65c96803f9fe (diff) | |
download | ptxdist-c411ae70feff21b67015dee7e1507fe61fb02a58.tar.gz ptxdist-c411ae70feff21b67015dee7e1507fe61fb02a58.tar.xz |
* added chrony default config, tools, menu entries
git-svn-id: https://svn.pengutronix.de/svn/ptxdist/trunks/ptxdist-trunk@7060 33e552b5-05e3-0310-8538-816dae2090ed
Diffstat (limited to 'rules')
-rw-r--r-- | rules/chrony.in | 101 | ||||
-rw-r--r-- | rules/chrony.make | 86 | ||||
-rw-r--r-- | rules/rootfs_rc_d_links.in | 10 |
3 files changed, 191 insertions, 6 deletions
diff --git a/rules/chrony.in b/rules/chrony.in index da6528586..09e28998d 100644 --- a/rules/chrony.in +++ b/rules/chrony.in @@ -1,7 +1,8 @@ -config CHRONY - bool +# chrony configuration + +menuconfig CHRONY + bool "Chrony " select READLINE - prompt "Chrony " help FIXME: remove READLINE select when 1.21 works again. @@ -16,3 +17,97 @@ config CHRONY various settings. See http://chrony.sunsite.dk/ for details + +comment "install options ---" + depends on CHRONY + +config CHRONY_INSTALL_CHRONY_COMMAND + depends on CHRONY + bool + default n + prompt "Install chrony command helper" + help + Install a command helper in /usr/bin/chrony_command, + which extracts the command access key from + /etc/chrony/chrony.keys and uses it to run + one given command. Note: The user needs access to + the chrony.keys file. + +menuconfig CHRONY_INSTALL_CONFIG + depends on CHRONY + bool + default y + 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 + +config CHRONY_DEFAULT_ACCESS_KEY + depends on CHRONY + string + prompt "setup default access key for chronyc" + default "undefined" + help + This will install a default access key with the + given content to the chrony.keys file. This is + used by /etc/init.d/chrony to access status + data, etc. + +config CHRONY_DEFAULT_NTP_SERVER + depends on CHRONY + string + prompt "setup default ntp peer" + default "10.1.1.2" + help + This will set the ntp server for simple + configurations. + +menuconfig ROOTFS_ETC_INITD_CHRONY + depends on CHRONY + bool + default y + prompt "Install startup script" + help + The /etc/init.d/chrony script lets you control the chronyd daemon. + + choice + prompt "Kind of startup script" + depends on ROOTFS_ETC_INITD_CHRONY + default ROOTFS_ETC_INITD_CHRONY_DEFAULT + + config ROOTFS_ETC_INITD_CHRONY_DEFAULT + bool + prompt "Use generic" + help + Install a generic /etc/init.d/chrony file. + See <ptxdist-install>/generic/etc/init.d/chrony + + config ROOTFS_ETC_INITD_CHRONY_USER + bool + prompt "User defined" + help + This uses a user defined httpd startup script. PTXdist + uses file projectroot/etc/init.d/chrony in your local + project + endchoice diff --git a/rules/chrony.make b/rules/chrony.make index 695d98bbd..a6818d5bf 100644 --- a/rules/chrony.make +++ b/rules/chrony.make @@ -111,12 +111,92 @@ $(STATEDIR)/chrony.targetinstall: $(chrony_targetinstall_deps_default) @$(call install_fixup, chrony,PRIORITY,optional) @$(call install_fixup, chrony,VERSION,$(CHRONY_VERSION)) @$(call install_fixup, chrony,SECTION,base) - @$(call install_fixup, chrony,AUTHOR,"Robert Schwebel <r.schwebel\@pengutronix.de>") + @$(call install_fixup, chrony,AUTHOR,"PTXdist Base Package <ptxdist\@pengutronix.de>") @$(call install_fixup, chrony,DEPENDS,) @$(call install_fixup, chrony,DESCRIPTION,missing) - @$(call install_copy, chrony, 0, 0, 0755, $(CHRONY_DIR)/chronyd, /usr/sbin/chronyd) - @$(call install_copy, chrony, 0, 0, 0755, $(CHRONY_DIR)/chronyc, /usr/bin/chronyc) +# --------------------------- +# install chrony binaries +# + @$(call install_copy, chrony, 0, 0, 0755, \ + $(CHRONY_DIR)/chronyd, \ + /usr/sbin/chronyd) + @$(call install_copy, chrony, 0, 0, 0755, \ + $(CHRONY_DIR)/chronyc, \ + /usr/bin/chronyc) + +# --------------------------- +# install chrony command helper script on demand +# +ifdef PTXCONF_CHRONY_INSTALL_CHRONY_COMMAND + @$(call install_copy, chrony, 0, 0, 0755, \ + $(PTXDIST_TOPDIR)/generic/usr/bin/chrony_command, \ + /usr/bin/chrony_command, n) +endif + +# --------------------------- +# generate a config file +# +ifdef PTXCONF_CHRONY_INSTALL_CONFIG +ifdef PTXCONF_CHRONY_DEFAULTCONFIG +# use generic one + @$(call install_copy, chrony, 0, 0, 0644, \ + $(PTXDIST_TOPDIR)/generic/etc/chrony/chrony.conf, \ + /etc/chrony/chrony.conf, n) + @$(call install_copy, chrony, 0, 0, 0600, \ + $(PTXDIST_TOPDIR)/generic/etc/chrony/chrony.keys, \ + /etc/chrony/chrony.keys, n) +endif +ifdef PTXCONF_CHRONY_USERCONFIG +# users one + @$(call install_copy, chrony, 0, 0, 0644, \ + $(PTXDIST_WORKSPACE)/projectroot/etc/chrony/chrony.conf, \ + /etc/chrony/chrony.conf, n) + @$(call install_copy, chrony, 0, 0, 0600, \ + $(PTXDIST_WORKSPACE)/projectroot/etc/chrony/chrony.keys, \ + /etc/chrony/chrony.keys, n) +endif +# modify placeholders with data from configuration + @$(call install_replace, chrony, /etc/chrony/chrony.conf, \ + @UNCONFIGURED_CHRONY_SERVER_IP@, $(PTXCONF_CHRONY_DEFAULT_NTP_SERVER) ) + + @$(call install_replace, chrony, /etc/chrony/chrony.keys, \ + @UNCONFIGURED_CHRONY_ACCESS_KEY@, $(PTXCONF_CHRONY_DEFAULT_ACCESS_KEY) ) +endif + +# --------------------------- +# install startup script on demand +# +ifdef PTXCONF_ROOTFS_ETC_INITD_CHRONY +ifdef PTXCONF_ROOTFS_ETC_INITD_CHRONY_DEFAULT +# generic script with path modifications + @$(call install_copy, chrony, 0, 0, 0755, \ + $(PTXDIST_TOPDIR)/generic/etc/init.d/chrony, \ + /etc/init.d/chrony, n) +endif +ifdef PTXCONF_ROOTFS_ETC_INITD_CHRONY_USER +# users one + @$(call install_copy, chrony, 0, 0, 0755, \ + $(PTXDIST_WORKSPACE)/projectroot/etc/init.d/chrony, \ + /etc/init.d/chrony, n) +endif +# install link to launch automatically if enabled +ifneq ($(PTXCONF_ROOTFS_ETC_INITD_CHRONY_LINK),"") + @$(call install_link, chrony, \ + ../init.d/chrony, \ + /etc/rc.d/$(PTXCONF_ROOTFS_ETC_INITD_CHRONY_LINK)) +endif +endif + +# --------------------------- +# install chrony 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, n) +endif + @$(call install_finish, chrony) diff --git a/rules/rootfs_rc_d_links.in b/rules/rootfs_rc_d_links.in index 69a40dc55..ce31f1885 100644 --- a/rules/rootfs_rc_d_links.in +++ b/rules/rootfs_rc_d_links.in @@ -42,6 +42,16 @@ config ROOTFS_ETC_INITD_BANNER_LINK /etc/init.d/banner. Keep this entry empty if you do not want to start this service automatically. +config ROOTFS_ETC_INITD_CHRONY_LINK + depends on ROOTFS_ETC_INITD_CHRONY_DEFAULT || ROOTFS_ETC_INITD_CHRONY_USER + string + prompt "chrony link name" + default "S03_chrony" + help + Set a link into /etc/rc.d which points to /etc/init.d/chrony to + start chronyd ntp client/server when system starts. Keep this + entry empty if you do not want to start this service automatically. + config ROOTFS_ETC_INITD_NFS_LINK depends on ROOTFS_ETC_INITD_NFS_DEFAULT || ROOTFS_ETC_INITD_NFS_USER string |