1
0
mirror of https://github.com/dguglielmi/sunny-overlay.git synced 2025-12-06 13:52:40 +01:00
Files
sunny-overlay/sys-kernel/dracut-openssh/dracut-openssh-0.2.ebuild

43 lines
952 B
Bash

# Copyright 2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
DESCRIPTION="Dracut OpenSSH module"
HOMEPAGE="https://github.com/dguglielmi/dracut-openssh"
SRC_URI=""
LICENSE="GPL-3+"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="systemd-networkd"
DEPEND="!systemd-networkd? ( net-misc/dhcp )
net-misc/openssh
sys-apps/systemd
sys-kernel/dracut"
RDEPEND="${DEPEND}"
S="${WORKDIR}"
src_install() {
dodir /usr/lib/dracut/modules.d/48openssh
insinto /usr/lib/dracut/modules.d/48openssh
doins "${FILESDIR}"/sshd_config
doins "${FILESDIR}"/sshd-banner
doins "${FILESDIR}"/sshd.service
exeinto /usr/lib/dracut/modules.d/48openssh
doexe "${FILESDIR}/module-setup.sh"
insinto /etc/dracut.conf.d
doins "${FILESDIR}/dracut-openssh.conf"
if use systemd-networkd; then
sed -i \
's@^#network_provider=.*@network_provider="systemd-networkd"@1' \
"${D}"/etc/dracut.conf.d/dracut-openssh.conf || die
fi
}