mirror of
https://github.com/RetroDECK/RetroDECK.git
synced 2025-02-16 19:35:39 +00:00
Fix network checks.
This commit is contained in:
parent
9809d2324a
commit
0d078cb88a
10
functions.sh
10
functions.sh
|
@ -710,7 +710,7 @@ done < $1
|
||||||
|
|
||||||
check_network_connectivity() {
|
check_network_connectivity() {
|
||||||
# This function will do a basic check for network availability and return "true" if it is working.
|
# This function will do a basic check for network availability and return "true" if it is working.
|
||||||
# USAGE: if [[ check_network_connectivity == "true" ]]; then
|
# USAGE: if [[ $(check_network_connectivity) == "true" ]]; then
|
||||||
|
|
||||||
wget -q --spider $rd_repo
|
wget -q --spider $rd_repo
|
||||||
|
|
||||||
|
@ -1550,7 +1550,7 @@ cli_emulator_reset() {
|
||||||
case $1 in
|
case $1 in
|
||||||
|
|
||||||
"retroarch" )
|
"retroarch" )
|
||||||
if [[ check_network_connectivity == "true" ]]; then
|
if [[ $(check_network_connectivity) == "true" ]]; then
|
||||||
ra_init
|
ra_init
|
||||||
else
|
else
|
||||||
printf "You do not appear to be connected to a network with internet access.\n\nThe RetroArch reset process requires some files from the internet to function properly.\n\nPlease retry this process once a network connection is available.\n"
|
printf "You do not appear to be connected to a network with internet access.\n\nThe RetroArch reset process requires some files from the internet to function properly.\n\nPlease retry this process once a network connection is available.\n"
|
||||||
|
@ -1584,7 +1584,7 @@ cli_emulator_reset() {
|
||||||
rpcs3_init
|
rpcs3_init
|
||||||
;;
|
;;
|
||||||
"xemu" )
|
"xemu" )
|
||||||
if [[ check_network_connectivity == "true" ]]; then
|
if [[ $(check_network_connectivity) == "true" ]]; then
|
||||||
xemu_init
|
xemu_init
|
||||||
else
|
else
|
||||||
printf "You do not appear to be connected to a network with internet access.\n\nThe Xemu reset process requires some files from the internet to function properly.\n\nPlease retry this process once a network connection is available.\n"
|
printf "You do not appear to be connected to a network with internet access.\n\nThe Xemu reset process requires some files from the internet to function properly.\n\nPlease retry this process once a network connection is available.\n"
|
||||||
|
@ -1594,7 +1594,7 @@ cli_emulator_reset() {
|
||||||
yuzu_init
|
yuzu_init
|
||||||
;;
|
;;
|
||||||
"all-emulators" )
|
"all-emulators" )
|
||||||
if [[ check_network_connectivity == "true" ]]; then
|
if [[ $(check_network_connectivity) == "true" ]]; then
|
||||||
ra_init
|
ra_init
|
||||||
standalones_init
|
standalones_init
|
||||||
else
|
else
|
||||||
|
@ -2193,4 +2193,4 @@ configurator_reset_confirmation_dialog() {
|
||||||
else
|
else
|
||||||
echo "false"
|
echo "false"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
|
@ -135,7 +135,7 @@ then
|
||||||
# if the lock file doesn't exist at all means that it's a fresh install or a triggered reset
|
# if the lock file doesn't exist at all means that it's a fresh install or a triggered reset
|
||||||
else
|
else
|
||||||
echo "Lockfile not found"
|
echo "Lockfile not found"
|
||||||
if [[ check_network_connectivity == "true" ]]; then
|
if [[ $(check_network_connectivity) == "true" ]]; then
|
||||||
finit # Executing First/Force init
|
finit # Executing First/Force init
|
||||||
else
|
else
|
||||||
configurator_generic_dialog "You do not appear to be connected to a network with internet access.\n\nThe initial RetroDECK setup requires some files from the internet to function properly.\n\nPlease retry this process once a network connection is available."
|
configurator_generic_dialog "You do not appear to be connected to a network with internet access.\n\nThe initial RetroDECK setup requires some files from the internet to function properly.\n\nPlease retry this process once a network connection is available."
|
||||||
|
@ -152,7 +152,7 @@ fi
|
||||||
desktop_mode_warning
|
desktop_mode_warning
|
||||||
|
|
||||||
# Check if there is a new version of RetroDECK available, if update_check=true in retrodeck.cfg and there is network connectivity available.
|
# Check if there is a new version of RetroDECK available, if update_check=true in retrodeck.cfg and there is network connectivity available.
|
||||||
if [[ check_network_connectivity == "true" ]] && [[ $update_check == "true" ]]; then
|
if [[ $(check_network_connectivity) == "true" ]] && [[ $update_check == "true" ]]; then
|
||||||
check_for_version_update
|
check_for_version_update
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
@ -88,7 +88,7 @@ configurator_reset_dialog() {
|
||||||
|
|
||||||
"RetroArch" )
|
"RetroArch" )
|
||||||
if [[ $(configurator_reset_confirmation_dialog "RetroArch" "Are you sure you want to reset the RetroArch emulator to default settings?\n\nThis process cannot be undone.") == "true" ]]; then
|
if [[ $(configurator_reset_confirmation_dialog "RetroArch" "Are you sure you want to reset the RetroArch emulator to default settings?\n\nThis process cannot be undone.") == "true" ]]; then
|
||||||
if [[ check_network_connectivity == "true" ]]; then
|
if [[ $(check_network_connectivity) == "true" ]]; then
|
||||||
ra_init
|
ra_init
|
||||||
configurator_process_complete_dialog "resetting $emulator_to_reset"
|
configurator_process_complete_dialog "resetting $emulator_to_reset"
|
||||||
else
|
else
|
||||||
|
@ -193,7 +193,7 @@ configurator_reset_dialog() {
|
||||||
|
|
||||||
"XEMU" )
|
"XEMU" )
|
||||||
if [[ $(configurator_reset_confirmation_dialog "XEMU" "Are you sure you want to reset the XEMU emulator to default settings?\n\nThis process cannot be undone.") == "true" ]]; then
|
if [[ $(configurator_reset_confirmation_dialog "XEMU" "Are you sure you want to reset the XEMU emulator to default settings?\n\nThis process cannot be undone.") == "true" ]]; then
|
||||||
if [[ check_network_connectivity == "true" ]]; then
|
if [[ $(check_network_connectivity) == "true" ]]; then
|
||||||
xemu_init
|
xemu_init
|
||||||
configurator_process_complete_dialog "resetting $emulator_to_reset"
|
configurator_process_complete_dialog "resetting $emulator_to_reset"
|
||||||
else
|
else
|
||||||
|
@ -225,7 +225,7 @@ configurator_reset_dialog() {
|
||||||
|
|
||||||
"Reset All Emulators" )
|
"Reset All Emulators" )
|
||||||
if [[ $(configurator_reset_confirmation_dialog "all emulators" "Are you sure you want to reset all emulators to default settings?\n\nThis process cannot be undone.") == "true" ]]; then
|
if [[ $(configurator_reset_confirmation_dialog "all emulators" "Are you sure you want to reset all emulators to default settings?\n\nThis process cannot be undone.") == "true" ]]; then
|
||||||
if [[ check_network_connectivity == "true" ]]; then
|
if [[ $(check_network_connectivity) == "true" ]]; then
|
||||||
ra_init
|
ra_init
|
||||||
standalones_init
|
standalones_init
|
||||||
configurator_process_complete_dialog "resetting all emulators"
|
configurator_process_complete_dialog "resetting all emulators"
|
||||||
|
@ -1197,4 +1197,4 @@ configurator_welcome_dialog() {
|
||||||
|
|
||||||
# START THE CONFIGURATOR
|
# START THE CONFIGURATOR
|
||||||
|
|
||||||
configurator_welcome_dialog
|
configurator_welcome_dialog
|
||||||
|
|
Loading…
Reference in a new issue