mirror of
https://github.com/pi-hole/pi-hole.git
synced 2025-04-17 21:00:12 +00:00
Silence package_check
calls for display.
This commit is contained in:
parent
259186610f
commit
56f1520e9b
1 changed files with 20 additions and 20 deletions
|
@ -263,6 +263,9 @@ use_IPv4_and_or_IPv6() {
|
||||||
}
|
}
|
||||||
|
|
||||||
get_static_IPv4_settings() {
|
get_static_IPv4_settings() {
|
||||||
|
local ipSettingsCorrect = False
|
||||||
|
|
||||||
|
|
||||||
# Ask if the user wants to use DHCP settings as their static IP
|
# Ask if the user wants to use DHCP settings as their static IP
|
||||||
if (whiptail --backtitle "Calibrating network interface" --title "Static IP Address" --yesno "Do you want to use your current network settings as a static address?
|
if (whiptail --backtitle "Calibrating network interface" --title "Static IP Address" --yesno "Do you want to use your current network settings as a static address?
|
||||||
IP address: $IPv4addr
|
IP address: $IPv4addr
|
||||||
|
@ -276,7 +279,7 @@ It is also possible to use a DHCP reservation, but if you are going to do that,
|
||||||
# Otherwise, we need to ask the user to input their desired settings.
|
# Otherwise, we need to ask the user to input their desired settings.
|
||||||
# Start by getting the IPv4 address (pre-filling it with info gathered from DHCP)
|
# Start by getting the IPv4 address (pre-filling it with info gathered from DHCP)
|
||||||
# Start a loop to let the user enter their information with the chance to go back and edit it if necessary
|
# Start a loop to let the user enter their information with the chance to go back and edit it if necessary
|
||||||
until [[ ${ipSettingsCorrect} = True ]]
|
until [[ "${ipSettingsCorrect}" = True ]]
|
||||||
do
|
do
|
||||||
# Ask for the IPv4 address
|
# Ask for the IPv4 address
|
||||||
IPv4addr=$(whiptail --backtitle "Calibrating network interface" --title "IPv4 address" --inputbox "Enter your desired IPv4 address" ${r} ${c} "$IPv4addr" 3>&1 1>&2 2>&3)
|
IPv4addr=$(whiptail --backtitle "Calibrating network interface" --title "IPv4 address" --inputbox "Enter your desired IPv4 address" ${r} ${c} "$IPv4addr" 3>&1 1>&2 2>&3)
|
||||||
|
@ -523,6 +526,22 @@ version_check_dnsmasq(){
|
||||||
sed -i 's/^#conf-dir=\/etc\/dnsmasq.d$/conf-dir=\/etc\/dnsmasq.d/' ${dnsFile1}
|
sed -i 's/^#conf-dir=\/etc\/dnsmasq.d$/conf-dir=\/etc\/dnsmasq.d/' ${dnsFile1}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
install_packages() {
|
||||||
|
# accepts an array as argument
|
||||||
|
declare -a argArray1=("${!1}")
|
||||||
|
|
||||||
|
for i in "${argArray1[@]}"; do
|
||||||
|
echo -n "::: Checking for $i..."
|
||||||
|
package_check "${i}" 2>&1 > /dev/null
|
||||||
|
if ! [[ "$?" -eq 0 ]]; then
|
||||||
|
echo -n " Not found! Installing...."
|
||||||
|
${PKG_INSTALL} "$i" > /dev/null 2>&1
|
||||||
|
echo " done!"
|
||||||
|
else
|
||||||
|
echo " already installed!"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
}
|
||||||
install_scripts() {
|
install_scripts() {
|
||||||
# Install the scripts from /etc/.pihole to their various locations
|
# Install the scripts from /etc/.pihole to their various locations
|
||||||
echo ":::"
|
echo ":::"
|
||||||
|
@ -579,25 +598,6 @@ stop_service() {
|
||||||
echo " done."
|
echo " done."
|
||||||
}
|
}
|
||||||
|
|
||||||
install_packages() {
|
|
||||||
# accepts an array as argument
|
|
||||||
declare -a argArray1=("${!1}")
|
|
||||||
|
|
||||||
for i in "${argArray1[@]}"; do
|
|
||||||
echo -n "::: Checking for $i..."
|
|
||||||
package_check "${i}"
|
|
||||||
if ! [[ "$?" -eq 0 ]]; then
|
|
||||||
echo -n " Not found! Installing...."
|
|
||||||
${PKG_INSTALL} "$i" > /dev/null 2>&1
|
|
||||||
echo " done!"
|
|
||||||
else
|
|
||||||
echo " already installed!"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
installer_dependencies() {
|
installer_dependencies() {
|
||||||
#Running apt-get update/upgrade with minimal output can cause some issues with
|
#Running apt-get update/upgrade with minimal output can cause some issues with
|
||||||
#requiring user input (e.g password for phpmyadmin see #218)
|
#requiring user input (e.g password for phpmyadmin see #218)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue