summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathan Bauer2020-10-05 17:06:43 +0200
committerJonathan Bauer2020-10-05 17:06:43 +0200
commit0128db8bcc45570caa31fd6f623009aae58adca8 (patch)
tree7b1a0b6c73f3d4562029a8f8afd097452e1ffafa
parent[slx-dmsetup] part-table: Allow different units for min and max (diff)
downloadsystemd-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.sh42
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