diff options
author | Jonathan Bauer | 2020-10-05 17:06:43 +0200 |
---|---|---|
committer | Jonathan Bauer | 2020-10-05 17:06:43 +0200 |
commit | 0128db8bcc45570caa31fd6f623009aae58adca8 (patch) | |
tree | 7b1a0b6c73f3d4562029a8f8afd097452e1ffafa | |
parent | [slx-dmsetup] part-table: Allow different units for min and max (diff) | |
download | systemd-init-0128db8bcc45570caa31fd6f623009aae58adca8.tar.gz systemd-init-0128db8bcc45570caa31fd6f623009aae58adca8.tar.xz systemd-init-0128db8bcc45570caa31fd6f623009aae58adca8.zip |
[slx-network] no 'exit' in hooks...
-rw-r--r-- | modules.d/slx-network/hooks/activate-bootif-dhcp.sh | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/modules.d/slx-network/hooks/activate-bootif-dhcp.sh b/modules.d/slx-network/hooks/activate-bootif-dhcp.sh index 86679ce7..dd48c911 100644 --- a/modules.d/slx-network/hooks/activate-bootif-dhcp.sh +++ b/modules.d/slx-network/hooks/activate-bootif-dhcp.sh @@ -4,24 +4,24 @@ # within stage4, unless specifically disabled by SLX_STAGE4_DHCP . /etc/openslx -[ -n "$SLX_DISABLE_STAGE4_DHCP" ] && exit 0 - -mkdir -p "${NEWROOT}/opt/openslx/scripts" -for script in setup-bootif-network udhcpc-trigger; do - if [ -e "${NEWROOT}/opt/openslx/scripts/${script}" ]; then - mv "${NEWROOT}/opt/openslx/scripts/${script}"{,.stage4} - fi - cp -f "/opt/openslx/scripts/${script}.stage4" \ - "${NEWROOT}/opt/openslx/scripts/${script}" -done - -# copy udhcpc@ systemd service, backup existing ones for debugging -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 --quiet --root "$NEWROOT" enable "udhcpc-bootif" - +if [ -n "$SLX_DISABLE_STAGE4_DHCP" ]; then + mkdir -p "${NEWROOT}/opt/openslx/scripts" + for script in setup-bootif-network udhcpc-trigger; do + if [ -e "${NEWROOT}/opt/openslx/scripts/${script}" ]; then + mv "${NEWROOT}/opt/openslx/scripts/${script}"{,.stage4} + fi + cp -f "/opt/openslx/scripts/${script}.stage4" \ + "${NEWROOT}/opt/openslx/scripts/${script}" + done + + # copy udhcpc@ systemd service, backup existing ones for debugging + 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 --quiet --root "$NEWROOT" enable "udhcpc-bootif" +fi +true |