summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorErmal Luçi <eri@pfsense.org>2009-05-05 23:40:15 +0000
committerErmal Luçi <eri@pfsense.org>2009-05-05 23:40:15 +0000
commit83bc374960ab86911bb8d05d521ac94746c719ef (patch)
treebdc4030fc9e236c3093bdbee5b0e794d89a27d30 /etc
parent532b0fb81731189cda49874d6f5dbffb33be69c0 (diff)
downloadpfsense-83bc374960ab86911bb8d05d521ac94746c719ef.zip
pfsense-83bc374960ab86911bb8d05d521ac94746c719ef.tar.gz
Move exec_command function to util.inc.
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/pfsense-utils.inc16
-rw-r--r--etc/inc/util.inc16
2 files changed, 16 insertions, 16 deletions
diff --git a/etc/inc/pfsense-utils.inc b/etc/inc/pfsense-utils.inc
index 753ba8e..af90190 100644
--- a/etc/inc/pfsense-utils.inc
+++ b/etc/inc/pfsense-utils.inc
@@ -588,22 +588,6 @@ function find_virtual_ip_netmask($ip) {
}
}
-/****f* pfsense-utils/exec_command
- * NAME
- * exec_command - Execute a command and return a string of the result.
- * INPUTS
- * $command - String of the command to be executed.
- * RESULT
- * String containing the command's result.
- * NOTES
- * This function returns the command's stdout and stderr.
- ******/
-function exec_command($command) {
- $output = array();
- exec($command . ' 2>&1 ', $output);
- return(implode("\n", $output));
-}
-
/*
* convert_ip_to_network_format($ip, $subnet): converts an ip address to network form
diff --git a/etc/inc/util.inc b/etc/inc/util.inc
index 2be1f39..b129824 100644
--- a/etc/inc/util.inc
+++ b/etc/inc/util.inc
@@ -490,6 +490,22 @@ function log_error($error) {
return;
}
+/****f* util/exec_command
+ * NAME
+ * exec_command - Execute a command and return a string of the result.
+ * INPUTS
+ * $command - String of the command to be executed.
+ * RESULT
+ * String containing the command's result.
+ * NOTES
+ * This function returns the command's stdout and stderr.
+ ******/
+function exec_command($command) {
+ $output = array();
+ exec($command . ' 2>&1 ', $output);
+ return(implode("\n", $output));
+}
+
/* wrapper for exec() */
function mwexec($command, $mute = false) {
OpenPOWER on IntegriCloud