blob: 4266904b0c164186efa1dff3f898e4da0d7c384f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
. ${BUILDFILE%/*}/common.sh
pkgver=20180921
package() {
preamble
pkgdesc="Parabola server configuration: Automatic dhcpcd"
# ##### networking
depends+=(
dhcpcd
config-parabola-base-openresolv
)
# We install a udev rule to automatically start dhcpcd on each
# ethernet interface, to avoid any manual configuration of networking,
# that could change if the host VM changes.
add-file etc/udev/rules.d/81-dhcpcd.rules <<-'EOF'
ACTION=="add", SUBSYSTEM=="net", ID_NET_DRIVER!="tun", ENV{SYSTEMD_WANTS}="dhcpcd@$name.service"
EOF
# In order to work with network-online.target, we order
# dhcpcd@.service before network-online.target. But that's not
# enough! It's possible fore network-online.target to be reached
# before we've even detected the ethernet interfaces. So, we must
# order network-online.target after udev-settle, to ensure that it
# isn't reached until we've finished hardware detection.
add-file etc/systemd/system/dhcpcd@.service.d/wait-online.conf <<-'EOF'
[Unit]
Before=network-online.target
EOF
add-file etc/systemd/system/network-online.target.d/udev-settle.conf <<-'EOT'
[Unit]
Wants=systemd-udev-settle.service
After=systemd-udev-settle.service
EOT
postamble
}
|