Don't source the install script in webpage.sh #5270
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this PR aim to accomplish?:
While working on the installation script locally, I noticed a sourcing loop which prevents testing certain changes to the install script.
During installation, we source
webpage.sh
pi-hole/automated install/basic-install.sh
Line 1857 in d885e92
And one of the first things we do in
webpage.sh
is to source the install script from the repohttps://github.com/pi-hole/pi-hole/blob/d885e92674e8d8d9a673b35ae706b2c49ea05840/advanced/Scripts/webpage.sh#L27C8-L29
This leads to overwriting any function in the install script that initially called
webpage.sh
by the functions defined in the repo (which is stock master branch). Hence, downstream modifications to the install script will be reset.We source the installer script in
webpage.sh
for a few variables andvalid_ip()
andvalid_ip6()
.I tried to move the functions toutils.sh
but this does not work because the installer requires the function early and before we download theutils.sh
script.How does this PR accomplish the above?:
Duplicate
valid_ip()
andvalid_ip6()
intowebpage.sh
and remove sourcing of the installer script.By submitting this pull request, I confirm the following:
git rebase
)