summaryrefslogtreecommitdiffstats
path: root/modules.d/slx-network/hooks/activate-bootif-dhcp.sh
diff options
context:
space:
mode:
Diffstat (limited to 'modules.d/slx-network/hooks/activate-bootif-dhcp.sh')
-rw-r--r--modules.d/slx-network/hooks/activate-bootif-dhcp.sh6
1 files changed, 4 insertions, 2 deletions
diff --git a/modules.d/slx-network/hooks/activate-bootif-dhcp.sh b/modules.d/slx-network/hooks/activate-bootif-dhcp.sh
index 28e80f48..9a5f0b88 100644
--- a/modules.d/slx-network/hooks/activate-bootif-dhcp.sh
+++ b/modules.d/slx-network/hooks/activate-bootif-dhcp.sh
@@ -1,11 +1,13 @@
#!/bin/bash
#
# This script enables the udhcpc-based DHCP service for stage4,
-# unless specifically disabled by 'SLX_STAGE4_DHCP="no"'.
+# unless specifically disabled by 'SLX_STAGE4_DHCP="no"',
+# or the OpenSLX udhcpc service/script exists in stage4.
. /etc/openslx
-if [ "$SLX_STAGE4_DHCP" != "no" ]; then
+if [ "$SLX_STAGE4_DHCP" != "no" ] \
+ && ! [ -e "${NEWROOT}/opt/openslx/scripts/udhcpc-openslx" ]; then
mkdir -p "${NEWROOT}/opt/openslx/scripts"
for script in setup-bootif-network udhcpc-trigger; do
if [ -e "${NEWROOT}/opt/openslx/scripts/${script}" ]; then