mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-11-25 07:33:43 +00:00
Fix static IP not set because of in-line comment
Signed-off-by: Stephan Pillhofer <43667664+StephanPillhofer@users.noreply.github.com>
This commit is contained in:
parent
3491dbfd04
commit
122bc6b927
1 changed files with 2 additions and 2 deletions
|
@ -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
|
# Configure networking via dhcpcd
|
||||||
setDHCPCD() {
|
setDHCPCD() {
|
||||||
# Regex for matching a non-commented static ip address setting
|
# 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
|
# 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}"
|
printf " %b Static IP already configured\\n" "${INFO}"
|
||||||
# If it's not,
|
# If it's not,
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue