Revision 96d05f1d
Added by Renato Botelho almost 7 years ago
src/usr/local/www/pkg_mgr_install.php | ||
---|---|---|
608 | 608 |
} |
609 | 609 |
|
610 | 610 |
if (isset($params)) { |
611 |
$upgrade_script = "{$pfsense_upgrade} -y -l " . |
|
612 |
"{$logfilename}.txt -p {$sock_file}"; |
|
611 |
for ($idx = 0; $idx < 3; $idx++) { |
|
612 |
$upgrade_script = "{$pfsense_upgrade} -y -l " . |
|
613 |
"{$logfilename}.txt -p {$sock_file}"; |
|
613 | 614 |
|
614 |
unlink_if_exists($sock_file); |
|
615 |
$execpid = mwexec_bg("{$upgrade_script} {$params}"); |
|
615 |
unlink_if_exists($sock_file);
|
|
616 |
$execpid = mwexec_bg("{$upgrade_script} {$params}");
|
|
616 | 617 |
|
617 |
// Make sure the upgrade process starts |
|
618 |
while (posix_kill($execpid, 0) && !file_exists( |
|
619 |
$sock_file)) { |
|
620 |
sleep(1); |
|
621 |
} |
|
618 |
// Make sure the upgrade process starts
|
|
619 |
while (posix_kill($execpid, 0) && !file_exists(
|
|
620 |
$sock_file)) {
|
|
621 |
sleep(1);
|
|
622 |
}
|
|
622 | 623 |
|
623 |
if (posix_kill($execpid, 0) && file_exists( |
|
624 |
$sock_file)) { |
|
625 |
$start_polling = true; |
|
626 |
@file_put_contents($gui_pidfile, $execpid); |
|
627 |
@file_put_contents($gui_mode, $mode); |
|
624 |
if (posix_kill($execpid, 0) && file_exists( |
|
625 |
$sock_file)) { |
|
626 |
$start_polling = true; |
|
627 |
@file_put_contents($gui_pidfile, $execpid); |
|
628 |
@file_put_contents($gui_mode, $mode); |
|
629 |
break; |
|
630 |
} |
|
628 | 631 |
} |
629 | 632 |
} |
630 | 633 |
} |
Also available in: Unified diff
Try to run upgrade script 3 times