diff --git a/plugins/dynamix.plugin.manager/include/PluginHelpers.php b/plugins/dynamix.plugin.manager/include/PluginHelpers.php index 16fad2fd5..67076a500 100644 --- a/plugins/dynamix.plugin.manager/include/PluginHelpers.php +++ b/plugins/dynamix.plugin.manager/include/PluginHelpers.php @@ -21,13 +21,8 @@ function plugin($method, $arg = '') { } function check_plugin($arg, $google='8.8.8.8') { - $inet = 3; - // ping google DNS server first to ensure internet is present - while (1) { - if (exec("ping -qnc1 $google|awk '/received/{print $4}'")==1) break; - $inet--; - if (!$inet) break; - } +// ping google DNS server first to ensure internet is present + $inet = exec("ping -qnc2 -i0.2 $google|awk '/received/{print $4}'"); return $inet ? plugin('check',$arg) : false; } diff --git a/plugins/dynamix.plugin.manager/include/ShowPlugins.php b/plugins/dynamix.plugin.manager/include/ShowPlugins.php index 4061527cb..8611b1076 100644 --- a/plugins/dynamix.plugin.manager/include/ShowPlugins.php +++ b/plugins/dynamix.plugin.manager/include/ShowPlugins.php @@ -16,7 +16,6 @@ require_once "$docroot/webGui/include/Markdown.php"; require_once "$docroot/plugins/dynamix.plugin.manager/include/PluginHelpers.php"; $current = parse_ini_file('/etc/unraid-version'); -$stale = $_GET['stale'] ?? false; $release = $_GET['release'] ?? false; $system = $_GET['system'] ?? false; $empty = true; @@ -35,7 +34,7 @@ foreach (glob("/var/log/plugins/*.plg",GLOB_NOSORT) as $plugin_link) { //switch between system and custom plugins if (($system && !$custom) || (!$system && $custom)) continue; //forced plugin check - check_plugin("$name.plg"); + $checked = check_plugin("$name.plg"); //OS update? $os = $system && $name==$builtin[0]; $toggle = false; @@ -73,12 +72,12 @@ foreach (glob("/var/log/plugins/*.plg",GLOB_NOSORT) as $plugin_link) { //category $cat = strpos($version,'rc')!==false ? 'next' : 'stable'; //status - $status = 'no update'; + $status = 'unknown'; $changes_file = $plugin_file; $URL = plugin('pluginURL',$plugin_file); if ($URL !== false) { $filename = "/tmp/plugins/".(($os && $release) ? $tmp_plg : basename($URL)); - if (file_exists($filename)) { + if ($checked && file_exists($filename)) { if ($toggle && $toggle != $version) { $status = make_link('install',$plugin_file,'forced'); } else { @@ -96,10 +95,7 @@ foreach (glob("/var/log/plugins/*.plg",GLOB_NOSORT) as $plugin_link) { $status = "up-to-date"; } } - } else { - if ($stale) $status = "unknown"; - } - $nofetch |= ($status == 'no update'); + } else $nofetch = true; } $changes = plugin('changes',$changes_file); if ($changes !== false) { diff --git a/plugins/dynamix/scripts/bootmode b/plugins/dynamix/scripts/bootmode old mode 100644 new mode 100755