Skip to content

Commit c8ed64a

Browse files
committed
Check for DHCP address
1 parent 8e99147 commit c8ed64a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

templates/common/baremetal/files/NetworkManager-static-dhcp.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,11 @@ contents:
55
#!/bin/bash
66
set -ex -o pipefail
77
8-
env
8+
if [ -z ${DHCP4_IP_ADDRESS:-} ]
9+
then
10+
>&2 echo "Not a DHCP4 address. Ignoring."
11+
exit 0
12+
fi
913
1014
if [ ${DHCP4_DHCP_LEASE_TIME:-0} -lt 4294967295 ]
1115
then

0 commit comments

Comments
 (0)