| # Copyright 2015 The Chromium OS Authors. All rights reserved. |
| # Distributed under the terms of the GNU General Public License v2 |
| |
| EAPI="5" |
| |
| inherit systemd |
| |
| DESCRIPTION="Board-specific packages for all Lakitu derivatives" |
| HOMEPAGE="http://src.chromium.org" |
| SRC_URI="" |
| |
| LICENSE="BSD-Google" |
| SLOT="0" |
| KEYWORDS="-* amd64 arm64 arm" |
| IUSE="crash_reporting platform_gcp" |
| |
| RDEPEND=" |
| sys-apps/baselayout |
| " |
| |
| S="${WORKDIR}" |
| |
| src_install() { |
| insinto /etc |
| doins "${FILESDIR}"/nsswitch.conf |
| |
| insinto /etc |
| doins "${FILESDIR}"/os-release |
| |
| if use crash_reporting; then |
| exeinto /opt/google/crash-reporter |
| newexe "${FILESDIR}"/crash-filter filter |
| fi |
| |
| |
| insinto /etc/profile.d/ |
| doins ${FILESDIR}/editor.sh |
| doins ${FILESDIR}/umask.sh |
| |
| systemd_dounit "${FILESDIR}"/report-system-info.service |
| systemd_enable_service multi-user.target report-system-info.service |
| |
| insinto "$(systemd_get_unitdir)"/systemd-fsck@.service.d |
| doins "${FILESDIR}"/fsck-log-to-serial-console.conf |
| |
| # Nvidia drivers are mounted here at runtime |
| keepdir /usr/share/nvidia |
| } |
| |
| pkg_postinst() { |
| if use platform_gcp; then |
| # Ensure /etc/hosts file has entry for metadata server. |
| local entry="169.254.169.254 metadata.google.internal metadata" |
| local hosts="${ROOT}"/etc/hosts |
| if ! grep -qs "${entry}" "${hosts}"; then |
| echo "${entry}" >> "${hosts}" |
| fi |
| fi |
| } |