diff options
author | Jonathan Bauer | 2019-08-12 17:14:17 +0200 |
---|---|---|
committer | Jonathan Bauer | 2019-08-12 17:39:43 +0200 |
commit | 215895c8e25cf3eb5a3c787854ac7ce3973991b5 (patch) | |
tree | f730a33432e60c502b449f3082c21c5dc698bce0 /builder | |
parent | [slx-addons] glob whiteout file names (diff) | |
download | systemd-init-215895c8e25cf3eb5a3c787854ac7ce3973991b5.tar.gz systemd-init-215895c8e25cf3eb5a3c787854ac7ce3973991b5.tar.xz systemd-init-215895c8e25cf3eb5a3c787854ac7ce3973991b5.zip |
[slx-network] use tmpfiles.d mechanism
for /run/network
Diffstat (limited to 'builder')
3 files changed, 5 insertions, 2 deletions
diff --git a/builder/modules.d/slx-network/hooks/activate-bootif-dhcp.sh b/builder/modules.d/slx-network/hooks/activate-bootif-dhcp.sh index 179254d0..86040e6e 100644 --- a/builder/modules.d/slx-network/hooks/activate-bootif-dhcp.sh +++ b/builder/modules.d/slx-network/hooks/activate-bootif-dhcp.sh @@ -14,6 +14,9 @@ done mkdir -p "${NEWROOT}/etc/systemd/system" cp -f "/opt/openslx/services/udhcpc-bootif.service" "${NEWROOT}/etc/systemd/system" +# it requires /run/network +echo 'd /run/network 0755 root root' > "${NEWROOT}/etc/tmpfiles.d/network.conf" + # activate it for the bridge or the physical interface if not bridged systemctl --root "$NEWROOT" enable "udhcpc-bootif" diff --git a/builder/modules.d/slx-network/scripts/udhcpc-trigger.stage4 b/builder/modules.d/slx-network/scripts/udhcpc-trigger.stage4 index a7e8d3aa..b51328ca 100755 --- a/builder/modules.d/slx-network/scripts/udhcpc-trigger.stage4 +++ b/builder/modules.d/slx-network/scripts/udhcpc-trigger.stage4 @@ -15,8 +15,6 @@ fi RESOLV_CONF="/opt/openslx/resolv.conf" THIS_RESOLV="/run/network/${SLX_PXE_NETIF}.resolv" -mkdir -p "/run/network" - rebuild_resolv_conf () { # Don't do anything if the active resolv.conf is not ours # Also this will not run resolvconf update.d... No idea if we should still do so... diff --git a/builder/modules.d/slx-network/services/udhcpc-bootif.service b/builder/modules.d/slx-network/services/udhcpc-bootif.service index 9578ad33..388792e4 100644 --- a/builder/modules.d/slx-network/services/udhcpc-bootif.service +++ b/builder/modules.d/slx-network/services/udhcpc-bootif.service @@ -1,6 +1,8 @@ [Unit] Description=DHCP Client for the main boot interface Before=network.target +Requires=systemd-tmpfiles-setup +After=systemd-tmpfiles-setup [Service] Type=forking |