diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/etc/inc/interfaces.inc | 15 | ||||
-rwxr-xr-x | src/usr/local/sbin/pfSense-upgrade | 23 | ||||
-rwxr-xr-x | src/usr/local/www/diag_dump_states.php | 2 | ||||
-rw-r--r-- | src/usr/local/www/firewall_nat_npt.php | 8 | ||||
-rw-r--r-- | src/usr/local/www/interfaces_qinq.php | 2 | ||||
-rw-r--r-- | src/usr/local/www/pkg_mgr_install.php | 18 | ||||
-rw-r--r-- | src/usr/local/www/services_dyndns.php | 2 | ||||
-rw-r--r-- | src/usr/local/www/services_rfc2136.php | 6 | ||||
-rw-r--r-- | src/usr/local/www/status_rrd_graph.php | 11 | ||||
-rw-r--r-- | src/usr/local/www/vpn_l2tp_users.php | 2 |
10 files changed, 57 insertions, 32 deletions
diff --git a/src/etc/inc/interfaces.inc b/src/etc/inc/interfaces.inc index 88d2b86..3e41d49 100644 --- a/src/etc/inc/interfaces.inc +++ b/src/etc/inc/interfaces.inc @@ -742,9 +742,10 @@ function interface_lagg_configure($lagg) { $smallermtu = 0; foreach ($members as $member) { $mtu = get_interface_mtu($member); - if ($smallermtu == 0 && !empty($mtu)) { - $smallermtu = $mtu; - } else if (!empty($mtu) && $mtu < $smallermtu) { + if (empty($mtu)) { + continue; + } + if ($smallermtu == 0 || $mtu < $smallermtu) { $smallermtu = $mtu; } } @@ -5073,8 +5074,8 @@ function interface_find_child_cfgmtu($realiface) { } } if (is_array($gifs)) { - foreach ($gifs as $vlan) { - $ifass = convert_real_interface_to_friendly_interface_name($vlan['gifif']); + foreach ($gifs as $gif) { + $ifass = convert_real_interface_to_friendly_interface_name($gif['gifif']); if (empty($ifass)) { continue; } @@ -5086,8 +5087,8 @@ function interface_find_child_cfgmtu($realiface) { } } if (is_array($gres)) { - foreach ($gres as $vlan) { - $ifass = convert_real_interface_to_friendly_interface_name($vlan['greif']); + foreach ($gres as $gre) { + $ifass = convert_real_interface_to_friendly_interface_name($gre['greif']); if (empty($ifass)) { continue; } diff --git a/src/usr/local/sbin/pfSense-upgrade b/src/usr/local/sbin/pfSense-upgrade index 2ce7421..536bb45 100755 --- a/src/usr/local/sbin/pfSense-upgrade +++ b/src/usr/local/sbin/pfSense-upgrade @@ -147,8 +147,12 @@ _exit() { local _rc=${1:-"0"} # If EVENT_PIPE is defined, GUI is calling - [ -n "${progress_socket}" ] \ - && _echo "__RC=${_rc}" + if [ -n "${progress_socket}" ]; then + local _need_reboot_str="" + [ -n "${need_reboot}" ] \ + && _need_reboot_str=" __REBOOT_AFTER=${reboot_after}" + _echo "__RC=${_rc}${_need_reboot_str}" + fi exit ${_rc} } @@ -646,11 +650,15 @@ pkg_reinstall_all() { } do_reboot() { - _echo "Upgrade is complete. Rebooting in 10 seconds." - echo "Upgrade is complete. Rebooting in 10 seconds." | wall - /etc/rc.notify_message -e -g -m "Upgrade is complete. Rebooting in 10 seconds." if [ -z "${dont_reboot}" ]; then - (sleep 10 && /etc/rc.reboot) & + _echo "Upgrade is complete. Rebooting in ${reboot_after} seconds." + echo "Upgrade is complete. Rebooting in ${reboot_after} seconds." | wall + /etc/rc.notify_message -e -g -m "Upgrade is complete. Rebooting in ${reboot_after} seconds." + (sleep ${reboot_after} && /etc/rc.reboot) & + else + _echo "Upgrade is complete." + echo "Upgrade is complete." | wall + /etc/rc.notify_message -e -g -m "Upgrade is complete." fi } @@ -687,6 +695,9 @@ export chroot_dir="" # Save nc_pid to be able to kill it export nc_pid="" +# Reboot after 10 seconds +export reboot_after=10 + unset dry_run unset dont_reboot unset booting diff --git a/src/usr/local/www/diag_dump_states.php b/src/usr/local/www/diag_dump_states.php index 13777d4..70cfd68 100755 --- a/src/usr/local/www/diag_dump_states.php +++ b/src/usr/local/www/diag_dump_states.php @@ -207,7 +207,7 @@ print $form; <td><?= $state ?></td> <td> - <a class="btn fa fa-times" data-entry="<?=$srcip?>|<?=$dstip?>" + <a class="btn fa fa-trash" data-entry="<?=$srcip?>|<?=$dstip?>" title="<?=sprintf(gettext('Remove all state entries from %s to %s'), $srcip, $dstip);?>"></a> </td> </tr> diff --git a/src/usr/local/www/firewall_nat_npt.php b/src/usr/local/www/firewall_nat_npt.php index 2e62fba..9dc8fd5 100644 --- a/src/usr/local/www/firewall_nat_npt.php +++ b/src/usr/local/www/firewall_nat_npt.php @@ -120,7 +120,7 @@ $tab_array[] = array(gettext("NPt"), true, "firewall_nat_npt.php"); display_top_tabs($tab_array); ?> <div class="panel panel-default"> - <div class="panel-heading"><h2 class="panel-title"><?=gettext('NPt mappings')?></h2></div> + <div class="panel-heading"><h2 class="panel-title"><?=gettext('NPt Mappings')?></h2></div> <div class="panel-body"> <div class="table responsive"> <form method="post"> @@ -131,7 +131,7 @@ display_top_tabs($tab_array); <th><?=gettext("External Prefix")?></th> <th><?=gettext("Internal prefix")?></th> <th><?=gettext("Description")?></th> - <th><!-- Buttons --></th> + <th><?=gettext("Actions")?></th> </tr> </thead> <tbody class="user-entries"> @@ -167,8 +167,8 @@ foreach ($a_npt as $natent): <?=htmlspecialchars($natent['descr'])?> </td> <td> - <a href="firewall_nat_npt_edit.php?id=<?=$i?>" class="btn btn-xs btn-info"><?=gettext("Edit")?></a> - <a href="firewall_nat_npt.php?act=del&id=<?=$i?>" class="btn btn-xs btn-danger"><?=gettext("Delete")?></a> + <a class="fa fa-pencil" title="<?=gettext("Edit"); ?>" href="firewall_nat_npt_edit.php?id=<?=$i?>"></a> + <a class="fa fa-trash" title="<?=gettext("Delete")?>" href="firewall_nat_npt.php?act=del&id=<?=$i?>"></a> </td> </tr> <?php diff --git a/src/usr/local/www/interfaces_qinq.php b/src/usr/local/www/interfaces_qinq.php index 4f4395f..12289e9 100644 --- a/src/usr/local/www/interfaces_qinq.php +++ b/src/usr/local/www/interfaces_qinq.php @@ -141,7 +141,7 @@ display_top_tabs($tab_array); <thead> <tr> <th><?=gettext("Interface"); ?></th> - <th><?=gettext("Tag");?></td> + <th><?=gettext("Tag");?></th> <th><?=gettext("QinQ members"); ?></th> <th><?=gettext("Description"); ?></th> <th><?=gettext("Actions"); ?></th> diff --git a/src/usr/local/www/pkg_mgr_install.php b/src/usr/local/www/pkg_mgr_install.php index b603b06..05d96e0 100644 --- a/src/usr/local/www/pkg_mgr_install.php +++ b/src/usr/local/www/pkg_mgr_install.php @@ -127,8 +127,12 @@ if ($_REQUEST['ajax']) { // Log file is read a line at a time so that we can detect/modify certain entries while (($logline = fgets($logfile)) !== false) { // Check for return codes and replace with suitable strings - if (strpos($logline, "_RC=") != false) { - $code = str_replace("__RC=", "", $logline); + if (strpos($logline, "__RC=") == 0) { + list($code, $reboot_after) = explode(" ", $logline); + + $code = str_replace("__RC=", "", $code); + /* XXX: Implement a GUI timeout counter if (is_numericint($reboot_after)) */ + $reboot_after = str_replace("__REBOOT_AFTER=", "", $reboot_after); if ($code == 0) { $logline = gettext("Success") . "\n"; @@ -224,7 +228,7 @@ if ($_POST) { case 'reinstallall': $headline = gettext("Reinstall all packages"); case 'reinstallpkg': - if ($_GET['from'] && $_GET['from']) { + if ($_GET['from'] && $_GET['to']) { $headline = gettext("Upgrade package"); } else { $headline = gettext("Reinstall package"); @@ -243,7 +247,7 @@ if ($_POST) { if ($_GET && $_GET['id'] == "firmware") { $firmwareupdate = true; $firmwareversion = get_system_pkg_version(); - $headline = gettext("System update") ; + $headline = gettext("System Update") ; } $tab_array = array(); @@ -300,13 +304,13 @@ if ($input_errors) { ?> <?=gettext("All packages will be reinstalled.");?> <?php - } else if ($_GET['from'] && $_GET['from']) { + } else if ($_GET['from'] && $_GET['to']) { ?> Package: <b><?=$pkgname;?></b> will be upgraded from <b><?=$_GET['from']?></b> to <b><?=$_GET['to']?></b>. <?php } else if ($firmwareupdate) { ?> - <?=$g['product_name']?> <?=gettext(" system update")?> + <?=$g['product_name']?> <?=gettext(" System Update")?> <?php } else { ?> @@ -343,7 +347,7 @@ if ($input_errors) { ?> <div class="form-group"> <label class="col-sm-2 control-label"> - <?=gettext("Confirm Upgrade")?> + <?=gettext("Confirm Update")?> </label> <div class="col-sm-10"> <input type="hidden" name="id" value="firmware" /> diff --git a/src/usr/local/www/services_dyndns.php b/src/usr/local/www/services_dyndns.php index 3545558..c9f24ff 100644 --- a/src/usr/local/www/services_dyndns.php +++ b/src/usr/local/www/services_dyndns.php @@ -106,7 +106,7 @@ display_top_tabs($tab_array); ?> <form action="services_dyndns.php" method="post" name="iform" id="iform"> <div class="panel panel-default"> - <div class="panel-heading"><h2 class="panel-title"><?=gettext('Dynamic DNS clients')?></h2></div> + <div class="panel-heading"><h2 class="panel-title"><?=gettext('Dynamic DNS Clients')?></h2></div> <div class="panel-body"> <div class="table-responsive"> <table class="table table-striped table-hover table-condensed"> diff --git a/src/usr/local/www/services_rfc2136.php b/src/usr/local/www/services_rfc2136.php index 31a9270..afb6e86 100644 --- a/src/usr/local/www/services_rfc2136.php +++ b/src/usr/local/www/services_rfc2136.php @@ -104,18 +104,18 @@ if ($input_errors) { <form action="services_rfc2136.php" method="post" name="iform" id="iform"> <div class="panel panel-default"> - <div class="panel-heading"><h2 class="panel-title"><?=gettext('RFC2136 clients')?></h2></div> + <div class="panel-heading"><h2 class="panel-title"><?=gettext('RFC2136 Clients')?></h2></div> <div class="panel-body"> <div class="table-responsive"> <table class="table table-striped table-hover table-condensed"> <thead> <tr> - <th><?=gettext("IF")?></th> + <th><?=gettext("Interface")?></th> <th><?=gettext("Server")?></th> <th><?=gettext("Hostname")?></th> <th><?=gettext("Cached IP")?></th> <th><?=gettext("Description")?></th> - <th></th> + <th><?=gettext("Actions")?></th> </tr> </thead> <tbody> diff --git a/src/usr/local/www/status_rrd_graph.php b/src/usr/local/www/status_rrd_graph.php index 0ae10c0..2bea2c7 100644 --- a/src/usr/local/www/status_rrd_graph.php +++ b/src/usr/local/www/status_rrd_graph.php @@ -297,7 +297,16 @@ $graph_length = array( "year" => 31622400, "fouryear" => 126230400); -$pgtitle = array(gettext("Status"), gettext("RRD Graphs"), gettext(ucfirst($curcat)." Graphs")); +switch ($curcat) { + case "vpnusers": + $curcattext = "VPN Users"; + break; + default: + $curcattext = ucfirst($curcat); + break; +} + +$pgtitle = array(gettext("Status"), gettext("RRD Graphs"), gettext($curcattext . " Graphs")); /* Load all CP zones */ if ($captiveportal && is_array($config['captiveportal'])) { diff --git a/src/usr/local/www/vpn_l2tp_users.php b/src/usr/local/www/vpn_l2tp_users.php index dae7a72..cb9cc7d 100644 --- a/src/usr/local/www/vpn_l2tp_users.php +++ b/src/usr/local/www/vpn_l2tp_users.php @@ -120,7 +120,7 @@ $tab_array[] = array(gettext("Users"), true, "vpn_l2tp_users.php"); display_top_tabs($tab_array); ?> <div class="panel panel-default"> - <div class="panel-heading"><h2 class="panel-title"><?=gettext('L2TP Users')?>></h2></div> + <div class="panel-heading"><h2 class="panel-title"><?=gettext('L2TP Users')?></h2></div> <div class="panel-body"> <div class="table-responsive"> <table class="table table-striped table-hover"> |