# $HeadURL$ $LastChangedRevision$ ifndef FACILITY_TIME_MK FACILITY_TIME_MK = 1 # In pass #1: load recipe generators # In pass #0: load generated recipes include method-install.mk # Variables mentioned both in pass#1 and pass#0. TIME_NTP_SERVER_HOSTNAMES_FSENCODED = $(shell encode "$(TIME_NTP_SERVER_HOSTNAMES)") # Tell recipe generators what to generate recipes for ifeq ($(PCMS_PASS_NUM),1) all.install: ntp.install ntpdate.install # The real Makefile else ifeq ($(PCMS_PASS_NUM),0) all.facility: time.facility time.facility: ntp-$(TIME_NTP_SERVER_HOSTNAMES_FSENCODED).fix ntp.install ntpdate.install systemctl restart ntp touch $@ ntp-$(TIME_NTP_SERVER_HOSTNAMES_FSENCODED).fix: /etc/ntp.conf $(RM) ntp-*.fix { for X in $(TIME_NTP_SERVER_HOSTNAMES); do echo "server $$X"; done; } > /etc/ntp.conf touch $@ # Allowed not to exist /etc/ntp.conf: ; endif # PCMS_PASS_NUM endif # FACILITY_TIME_MK