pi-hole/automated install
MichaIng 86d4c9b1e0 Failsafe checks for available APT package
When checking for available packages in APT repository, running a dry-run install can fail for other reasons, even if the package is available. Currently, in such case, wrong fallback packages are selected: https://github.com/pi-hole/pi-hole/issues/2888
"apt-cache show <pkg>" is a quicker method to check for available packages. This is now done as well to check if the fallbacks are available. If none is found, the installer exits with meaningful error message and exit code.

In rare cases, the APT list files can be missing when the installer is started. E.g. this could be on a fresh system, APT lists could have been moved to RAM or removed as a cleanup step. "apt-cache" calls will then fail, same as dry-run installs were. To assure that current package lists are checked, update the package cache directly after the Ubuntu universe repo has been added, only in the Debian/Ubuntu block. This renders the variable handling in RH/Fedora block obsolete.

Signed-off-by: MichaIng <micha@dietpi.com>
2020-04-26 15:42:43 +02:00
..
basic-install.sh Failsafe checks for available APT package 2020-04-26 15:42:43 +02:00
uninstall.sh Assorted typo fixes. (#3126) 2020-03-08 16:53:14 -07:00