summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErmal Luçi <eri@pfsense.org>2009-05-05 23:31:23 +0000
committerErmal Luçi <eri@pfsense.org>2009-05-05 23:31:23 +0000
commit933a34dc77c1afdbcb79dffe66c6a395fb272a41 (patch)
tree1ba88e3adfcfd7a8ad9ef0e0a9c3d9286e66d08a
parent00109afd4d15d8c31c328e6e1736ced0d0299c0b (diff)
downloadpfsense-933a34dc77c1afdbcb79dffe66c6a395fb272a41.zip
pfsense-933a34dc77c1afdbcb79dffe66c6a395fb272a41.tar.gz
Remove unused function and function that provide the same functionality as php built-in ones.
-rw-r--r--etc/inc/pfsense-utils.inc64
-rwxr-xr-xusr/local/www/status_slbd_vs.php6
2 files changed, 4 insertions, 66 deletions
diff --git a/etc/inc/pfsense-utils.inc b/etc/inc/pfsense-utils.inc
index 94eae9c..45e1ec5 100644
--- a/etc/inc/pfsense-utils.inc
+++ b/etc/inc/pfsense-utils.inc
@@ -796,70 +796,6 @@ function update_status($status) {
}
/*
- * exec_command_and_return_text_array: execute command and return output
- */
-function exec_command_and_return_text_array($command) {
- $fd = popen($command . " 2>&1 ", "r");
- while(!feof($fd)) {
- $tmp .= fread($fd,49);
- }
- fclose($fd);
- $temp_array = split("\n", $tmp);
- return $temp_array;
-}
-
-/*
- * exec_command_and_return_text: execute command and return output
- */
-function exec_command_and_return_text($command) {
- return exec_command($command);
-}
-
-/*
- * exec_command_and_return_output: execute command and update output window dynamically
- */
-function execute_command_return_output($command) {
- global $fd_log, $pkg_interface;
- $fd = popen($command . " 2>&1 ", "r");
- if($pkg_interface <> "console") {
- echo "\n<script language=\"JavaScript\">this.document.forms[0].output.value = \"\";</script>";
- }
- $counter = 0;
- $counter2 = 0;
- while(!feof($fd)) {
- $tmp = fread($fd, 50);
- $tmp1 = ereg_replace("\n","\\n", $tmp);
- $text = ereg_replace("\"","'", $tmp1);
- $lasttext = "";
- if($lasttext == "..") {
- $text = "";
- $lasttext = "";
- $counter=$counter-2;
- } else {
- $lasttext .= $text;
- }
- if($counter > 51) {
- $counter = 0;
- $extrabreak = "\\n";
- } else {
- $extrabreak = "";
- $counter++;
- }
- if($counter2 > 600) {
- if($pkg_interface <> "console") {
- echo "\n<script language=\"JavaScript\">this.document.forms[0].output.value = \"\";</script>";
- }
- $counter2 = 0;
- } else
- $counter2++;
- if($pkg_interface <> "console") {
- echo "\n<script language=\"JavaScript\">this.document.forms[0].output.value = this.document.forms[0].output.value + \"" . $text . $extrabreak . "\"; f('output'); </script>";
- }
- }
- fclose($fd);
-}
-
-/*
* update_progress_bar($percent): updates the javascript driven progress bar.
*/
function update_progress_bar($percent) {
diff --git a/usr/local/www/status_slbd_vs.php b/usr/local/www/status_slbd_vs.php
index 0f56f32..e888860 100755
--- a/usr/local/www/status_slbd_vs.php
+++ b/usr/local/www/status_slbd_vs.php
@@ -78,8 +78,10 @@ $a_pool = &$config['load_balancer']['lbpool'];
// average: 1/60s 0/h 0/d sessions
// 0 redirect testvs active
-$redirects_a = exec_command_and_return_text_array('/usr/local/sbin/relayctl show redirects');
-$summary_a = exec_command_and_return_text_array('/usr/local/sbin/relayctl show summary');
+$redirects_a = array();
+exec('/usr/local/sbin/relayctl show redirects 2>&1', $redirects_a);
+$summary_a = array();
+exec('/usr/local/sbin/relayctl show summary 2>&1', $summary_a);
$rdr_a = parse_redirects($redirects_a);
//$server_a = parse_summary($summary_a, parse_redirects($redirects_a));
OpenPOWER on IntegriCloud