コード例 #1
0
ファイル: pkg_mgr_install.php プロジェクト: nmccurdy/pfsense
             send_event("service restart packages");
         } else {
             update_output_window(gettext("No packages are installed."));
         }
         break;
     case 'installed':
     default:
         $status = install_package($pkgid);
         if ($status != 0) {
             update_status(gettext("Installation of") . " {$pkgid} " . gettext("FAILED!"));
             $static_output .= "\n" . gettext("Installation halted.");
             update_output_window($static_output);
         } else {
             $status_a = gettext(sprintf("Installation of %s completed.", $pkgid));
             update_status($status_a);
             $status = get_after_install_info($pkgid);
             if ($status) {
                 $static_output .= "\n" . gettext("Installation completed.") . "\n{$pkgid} " . gettext("setup instructions") . ":\n{$status}";
             } else {
                 $static_output .= "\n" . gettext("Installation completed.   Please check to make sure that the package is configured from the respective menu then start the package.");
             }
             @file_put_contents("/tmp/{$pkgid}.info", $static_output);
             echo "<script type='text/javascript'>document.location=\"pkg_mgr_install.php?mode=installedinfo&pkg={$pkgid}\";</script>";
         }
         filter_configure();
         break;
 }
 // Delete all temporary package tarballs and staging areas.
 unlink_if_exists("/tmp/apkg_*");
 rmdir_recursive("/var/tmp/instmp*");
 // close log
コード例 #2
0
ファイル: pkg_mgr_install.php プロジェクト: rdmenezes/pfsense
        }
        update_status(gettext("All packages reinstalled."));
        $static_output .= "\n" . gettext("All packages reinstalled.");
        update_output_window($static_output);
        filter_configure();
        break;
    default:
        $status = install_package(htmlspecialchars($_GET['id']));
        if ($status == -1) {
            update_status(gettext("Installation of") . " " . htmlspecialchars($_GET['id']) . " " . gettext("FAILED!"));
            $static_output .= "\n" . gettext("Installation halted.");
            update_output_window($static_output);
        } else {
            $status_a = gettext("Installation of") . " " . htmlspecialchars($_GET['id']) . " " . gettext("completed.");
            update_status($status_a);
            $status = get_after_install_info($_GET['id']);
            if ($status) {
                $static_output .= "\n" . gettext("Installation completed.") . "\n{$_GET['id']} " . gettext("setup instructions") . ":\n{$status}";
            } else {
                $static_output .= "\n" . gettext("Installation completed.   Please check to make sure that the package is configured from the respective menu then start the package.");
            }
            file_put_contents("/tmp/{$_GET['id']}.info", $static_output);
            echo "<script type='text/javascript'>document.location=\"pkg_mgr_install.php?mode=installedinfo&pkg={$_GET['id']}\";</script>";
        }
        filter_configure();
        break;
}
// Delete all temporary package tarballs and staging areas.
unlink_if_exists("/tmp/apkg_*");
rmdir_recursive("/var/tmp/instmp*");
// close log