diff options
author | Dan Schaper <dan.schaper@pi-hole.net> | 2022-11-03 01:17:36 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-03 01:17:36 +0300 |
commit | f91606bb174092114a46a6134f0371a855657e74 (patch) | |
tree | ae55dbfaeee08e63467db4fdc5d7e1f671514fac | |
parent | 3491dbfd04120a71feee8d4f2bff16fff0c5a2aa (diff) | |
parent | 122bc6b927faded08757e603f33ba560dbb2c8b5 (diff) |
Fix static IP not set because of in-line comment in dhcpcd.conf (#4998)
-rwxr-xr-x | automated install/basic-install.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/automated install/basic-install.sh b/automated install/basic-install.sh index 0fda391d..8edd4936 100755 --- a/automated install/basic-install.sh +++ b/automated install/basic-install.sh @@ -829,10 +829,10 @@ It is also possible to use a DHCP reservation, but if you are going to do that, # Configure networking via dhcpcd setDHCPCD() { # Regex for matching a non-commented static ip address setting - local regex="^[ \t]*static ip_address[ \t]*=[ \t]*${IPV4_ADDRESS}[ \t]*$" + local regex="^[ \t]*static ip_address[ \t]*=[ \t]*${IPV4_ADDRESS}" # Check if static IP is already set in file - if grep -xq "${regex}" /etc/dhcpcd.conf; then + if grep -q "${regex}" /etc/dhcpcd.conf; then printf " %b Static IP already configured\\n" "${INFO}" # If it's not, else |