Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/pi-hole/pi-hole.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Schaper <dan.schaper@pi-hole.net>2022-11-03 01:17:36 +0300
committerGitHub <noreply@github.com>2022-11-03 01:17:36 +0300
commitf91606bb174092114a46a6134f0371a855657e74 (patch)
treeae55dbfaeee08e63467db4fdc5d7e1f671514fac
parent3491dbfd04120a71feee8d4f2bff16fff0c5a2aa (diff)
parent122bc6b927faded08757e603f33ba560dbb2c8b5 (diff)
Fix static IP not set because of in-line comment in dhcpcd.conf (#4998)
-rwxr-xr-xautomated install/basic-install.sh4
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