. ${BUILDFILE%/*}/common.sh pkgver=20180928 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", DEVPATH!="*/virtual/*", 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 }