From 122bc6b927faded08757e603f33ba560dbb2c8b5 Mon Sep 17 00:00:00 2001 From: Stephan Pillhofer <43667664+StephanPillhofer@users.noreply.github.com> Date: Wed, 2 Nov 2022 22:35:39 +0100 Subject: [PATCH] Fix static IP not set because of in-line comment Signed-off-by: Stephan Pillhofer <43667664+StephanPillhofer@users.noreply.github.com> --- automated install/basic-install.sh | 4 ++-- 1 file 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