1 |
commit: 35ebb75cbd1bf5df69313ebfd18c63b03c609edf |
2 |
Author: Mike Gilbert <floppym <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu May 21 01:56:33 2020 +0000 |
4 |
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu May 21 02:04:25 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=35ebb75c |
7 |
|
8 |
net-misc/dhcpcd: set rundir=/run/dhcpcd in 9.x |
9 |
|
10 |
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org> |
11 |
|
12 |
.../{dhcpcd-9.0.2.ebuild => dhcpcd-9.0.2-r1.ebuild} | 6 +++--- |
13 |
net-misc/dhcpcd/dhcpcd-9999.ebuild | 6 +++--- |
14 |
net-misc/dhcpcd/files/dhcpcd.initd-r1 | 17 +++++++++++++++++ |
15 |
net-misc/dhcpcd/files/dhcpcd.service-r1 | 15 +++++++++++++++ |
16 |
4 files changed, 38 insertions(+), 6 deletions(-) |
17 |
|
18 |
diff --git a/net-misc/dhcpcd/dhcpcd-9.0.2.ebuild b/net-misc/dhcpcd/dhcpcd-9.0.2-r1.ebuild |
19 |
similarity index 96% |
20 |
rename from net-misc/dhcpcd/dhcpcd-9.0.2.ebuild |
21 |
rename to net-misc/dhcpcd/dhcpcd-9.0.2-r1.ebuild |
22 |
index 9656eabee92..ac18c5907ad 100644 |
23 |
--- a/net-misc/dhcpcd/dhcpcd-9.0.2.ebuild |
24 |
+++ b/net-misc/dhcpcd/dhcpcd-9.0.2-r1.ebuild |
25 |
@@ -45,7 +45,7 @@ src_configure() { |
26 |
$(use_enable ipv6) |
27 |
$(use_enable privsep) |
28 |
$(usex elibc_glibc '--with-hook=yp.conf' '') |
29 |
- $(usex kernel_linux '--rundir=${EPREFIX}/run' '') |
30 |
+ --rundir=$(usex kernel_linux "${EPREFIX}/run/dhcpcd" "${EPREFIX}/var/run/dhcpcd") |
31 |
$(usex privsep '--privsepuser=dhcpcd' '') |
32 |
$(usex udev '' '--without-dev --without-udev') |
33 |
CC="$(tc-getCC)" |
34 |
@@ -56,8 +56,8 @@ src_configure() { |
35 |
src_install() { |
36 |
default |
37 |
keepdir /var/lib/dhcpcd |
38 |
- newinitd "${FILESDIR}"/${PN}.initd ${PN} |
39 |
- systemd_dounit "${FILESDIR}"/${PN}.service |
40 |
+ newinitd "${FILESDIR}"/dhcpcd.initd-r1 dhcpcd |
41 |
+ systemd_newunit "${FILESDIR}"/dhcpcd.service-r1 dhcpcd.service |
42 |
} |
43 |
|
44 |
pkg_postinst() { |
45 |
|
46 |
diff --git a/net-misc/dhcpcd/dhcpcd-9999.ebuild b/net-misc/dhcpcd/dhcpcd-9999.ebuild |
47 |
index 9656eabee92..ac18c5907ad 100644 |
48 |
--- a/net-misc/dhcpcd/dhcpcd-9999.ebuild |
49 |
+++ b/net-misc/dhcpcd/dhcpcd-9999.ebuild |
50 |
@@ -45,7 +45,7 @@ src_configure() { |
51 |
$(use_enable ipv6) |
52 |
$(use_enable privsep) |
53 |
$(usex elibc_glibc '--with-hook=yp.conf' '') |
54 |
- $(usex kernel_linux '--rundir=${EPREFIX}/run' '') |
55 |
+ --rundir=$(usex kernel_linux "${EPREFIX}/run/dhcpcd" "${EPREFIX}/var/run/dhcpcd") |
56 |
$(usex privsep '--privsepuser=dhcpcd' '') |
57 |
$(usex udev '' '--without-dev --without-udev') |
58 |
CC="$(tc-getCC)" |
59 |
@@ -56,8 +56,8 @@ src_configure() { |
60 |
src_install() { |
61 |
default |
62 |
keepdir /var/lib/dhcpcd |
63 |
- newinitd "${FILESDIR}"/${PN}.initd ${PN} |
64 |
- systemd_dounit "${FILESDIR}"/${PN}.service |
65 |
+ newinitd "${FILESDIR}"/dhcpcd.initd-r1 dhcpcd |
66 |
+ systemd_newunit "${FILESDIR}"/dhcpcd.service-r1 dhcpcd.service |
67 |
} |
68 |
|
69 |
pkg_postinst() { |
70 |
|
71 |
diff --git a/net-misc/dhcpcd/files/dhcpcd.initd-r1 b/net-misc/dhcpcd/files/dhcpcd.initd-r1 |
72 |
new file mode 100644 |
73 |
index 00000000000..5a872351ab9 |
74 |
--- /dev/null |
75 |
+++ b/net-misc/dhcpcd/files/dhcpcd.initd-r1 |
76 |
@@ -0,0 +1,17 @@ |
77 |
+#!/sbin/openrc-run |
78 |
+# Copyright 2007-2008 Roy Marples <roy@×××××××.name> |
79 |
+# All rights reserved. Released under the 2-clause BSD license. |
80 |
+ |
81 |
+command=${RC_PREFIX}/sbin/dhcpcd |
82 |
+pidfile=${RC_PREFIX}/var/run/dhcpcd/pid |
83 |
+command_args=-q |
84 |
+name="DHCP Client Daemon" |
85 |
+ |
86 |
+depend() |
87 |
+{ |
88 |
+ provide net |
89 |
+ need localmount |
90 |
+ use logger network |
91 |
+ after bootmisc modules |
92 |
+ before dns |
93 |
+} |
94 |
|
95 |
diff --git a/net-misc/dhcpcd/files/dhcpcd.service-r1 b/net-misc/dhcpcd/files/dhcpcd.service-r1 |
96 |
new file mode 100644 |
97 |
index 00000000000..b4309c39b4c |
98 |
--- /dev/null |
99 |
+++ b/net-misc/dhcpcd/files/dhcpcd.service-r1 |
100 |
@@ -0,0 +1,15 @@ |
101 |
+[Unit] |
102 |
+Description=Lightweight DHCP client daemon |
103 |
+Wants=network.target |
104 |
+Before=network.target network-online.target |
105 |
+ |
106 |
+[Service] |
107 |
+Type=forking |
108 |
+ExecStart=/sbin/dhcpcd -q |
109 |
+PIDFile=/run/dhcpcd/pid |
110 |
+# Avoid duplicate output on stderr/syslog |
111 |
+StandardOutput=null |
112 |
+StandardError=null |
113 |
+ |
114 |
+[Install] |
115 |
+WantedBy=multi-user.target |