summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Gilbert <floppym@gentoo.org>2020-05-20 21:56:33 -0400
committerMike Gilbert <floppym@gentoo.org>2020-05-20 22:04:25 -0400
commit35ebb75cbd1bf5df69313ebfd18c63b03c609edf (patch)
tree73b9e1fae0a02d92e5b5d1dc15704aea96fc6217 /net-misc/dhcpcd
parentdev-python/piexif: Fix test deps (diff)
downloadgentoo-35ebb75cbd1bf5df69313ebfd18c63b03c609edf.tar.gz
gentoo-35ebb75cbd1bf5df69313ebfd18c63b03c609edf.tar.bz2
gentoo-35ebb75cbd1bf5df69313ebfd18c63b03c609edf.zip
net-misc/dhcpcd: set rundir=/run/dhcpcd in 9.x
Signed-off-by: Mike Gilbert <floppym@gentoo.org>
Diffstat (limited to 'net-misc/dhcpcd')
-rw-r--r--net-misc/dhcpcd/dhcpcd-9.0.2-r1.ebuild (renamed from net-misc/dhcpcd/dhcpcd-9.0.2.ebuild)6
-rw-r--r--net-misc/dhcpcd/dhcpcd-9999.ebuild6
-rw-r--r--net-misc/dhcpcd/files/dhcpcd.initd-r117
-rw-r--r--net-misc/dhcpcd/files/dhcpcd.service-r115
4 files changed, 38 insertions, 6 deletions
diff --git a/net-misc/dhcpcd/dhcpcd-9.0.2.ebuild b/net-misc/dhcpcd/dhcpcd-9.0.2-r1.ebuild
index 9656eabee92..ac18c5907ad 100644
--- a/net-misc/dhcpcd/dhcpcd-9.0.2.ebuild
+++ b/net-misc/dhcpcd/dhcpcd-9.0.2-r1.ebuild
@@ -45,7 +45,7 @@ src_configure() {
$(use_enable ipv6)
$(use_enable privsep)
$(usex elibc_glibc '--with-hook=yp.conf' '')
- $(usex kernel_linux '--rundir=${EPREFIX}/run' '')
+ --rundir=$(usex kernel_linux "${EPREFIX}/run/dhcpcd" "${EPREFIX}/var/run/dhcpcd")
$(usex privsep '--privsepuser=dhcpcd' '')
$(usex udev '' '--without-dev --without-udev')
CC="$(tc-getCC)"
@@ -56,8 +56,8 @@ src_configure() {
src_install() {
default
keepdir /var/lib/dhcpcd
- newinitd "${FILESDIR}"/${PN}.initd ${PN}
- systemd_dounit "${FILESDIR}"/${PN}.service
+ newinitd "${FILESDIR}"/dhcpcd.initd-r1 dhcpcd
+ systemd_newunit "${FILESDIR}"/dhcpcd.service-r1 dhcpcd.service
}
pkg_postinst() {
diff --git a/net-misc/dhcpcd/dhcpcd-9999.ebuild b/net-misc/dhcpcd/dhcpcd-9999.ebuild
index 9656eabee92..ac18c5907ad 100644
--- a/net-misc/dhcpcd/dhcpcd-9999.ebuild
+++ b/net-misc/dhcpcd/dhcpcd-9999.ebuild
@@ -45,7 +45,7 @@ src_configure() {
$(use_enable ipv6)
$(use_enable privsep)
$(usex elibc_glibc '--with-hook=yp.conf' '')
- $(usex kernel_linux '--rundir=${EPREFIX}/run' '')
+ --rundir=$(usex kernel_linux "${EPREFIX}/run/dhcpcd" "${EPREFIX}/var/run/dhcpcd")
$(usex privsep '--privsepuser=dhcpcd' '')
$(usex udev '' '--without-dev --without-udev')
CC="$(tc-getCC)"
@@ -56,8 +56,8 @@ src_configure() {
src_install() {
default
keepdir /var/lib/dhcpcd
- newinitd "${FILESDIR}"/${PN}.initd ${PN}
- systemd_dounit "${FILESDIR}"/${PN}.service
+ newinitd "${FILESDIR}"/dhcpcd.initd-r1 dhcpcd
+ systemd_newunit "${FILESDIR}"/dhcpcd.service-r1 dhcpcd.service
}
pkg_postinst() {
diff --git a/net-misc/dhcpcd/files/dhcpcd.initd-r1 b/net-misc/dhcpcd/files/dhcpcd.initd-r1
new file mode 100644
index 00000000000..5a872351ab9
--- /dev/null
+++ b/net-misc/dhcpcd/files/dhcpcd.initd-r1
@@ -0,0 +1,17 @@
+#!/sbin/openrc-run
+# Copyright 2007-2008 Roy Marples <roy@marples.name>
+# All rights reserved. Released under the 2-clause BSD license.
+
+command=${RC_PREFIX}/sbin/dhcpcd
+pidfile=${RC_PREFIX}/var/run/dhcpcd/pid
+command_args=-q
+name="DHCP Client Daemon"
+
+depend()
+{
+ provide net
+ need localmount
+ use logger network
+ after bootmisc modules
+ before dns
+}
diff --git a/net-misc/dhcpcd/files/dhcpcd.service-r1 b/net-misc/dhcpcd/files/dhcpcd.service-r1
new file mode 100644
index 00000000000..b4309c39b4c
--- /dev/null
+++ b/net-misc/dhcpcd/files/dhcpcd.service-r1
@@ -0,0 +1,15 @@
+[Unit]
+Description=Lightweight DHCP client daemon
+Wants=network.target
+Before=network.target network-online.target
+
+[Service]
+Type=forking
+ExecStart=/sbin/dhcpcd -q
+PIDFile=/run/dhcpcd/pid
+# Avoid duplicate output on stderr/syslog
+StandardOutput=null
+StandardError=null
+
+[Install]
+WantedBy=multi-user.target