blob: 819d5a755dc3304f1c0877a6d05b2c6ec9e270d1 [file] [log] [blame]
#
# Copyright 2020 Google LLC
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# version 2 as published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
EAPI="7"
inherit systemd
DESCRIPTION="Chrony configuration package"
HOMEPAGE="http://src.chromium.org"
SRC_URI=""
LICENSE="BSD-Google"
SLOT="0"
KEYWORDS="-* amd64 arm64"
IUSE="platform_gcp platform_aws platform_azure platform_vsphere"
RDEPEND="
net-misc/chrony
"
S="${WORKDIR}"
src_install() {
insinto /etc/chrony
if use platform_gcp; then
newins "${FILESDIR}"/platform_gcp-chrony.conf chrony.conf
elif use platform_aws; then
newins "${FILESDIR}"/platform_aws-chrony.conf chrony.conf
elif use platform_azure; then
newins "${FILESDIR}"/platform_azure-chrony.conf chrony.conf
elif use platform_vsphere; then
newins "${FILESDIR}"/platform_vsphere-chrony.conf chrony.conf
systemd_dounit "${FILESDIR}"/dhcp-chrony-update-source.service
systemd_enable_service multi-user.target dhcp-chrony-update-source.service
insinto /etc/chrony
newins "${FILESDIR}/update-chrony.sh" update-chrony.sh
else
newins "${FILESDIR}"/default-chrony.conf chrony.conf
fi
}