summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2010-11-28 19:55:35 -0500
committerScott Ullrich <sullrich@pfsense.org>2010-11-28 19:55:35 -0500
commit84cf0b3ebfd88b561649d333811da52e92039498 (patch)
treeb904f814f0921634c715ee499c0e5827cd5c34df
parent690d24af8cd54ac4555087ed0392d53ea27e43ee (diff)
downloadpfsense-84cf0b3ebfd88b561649d333811da52e92039498.zip
pfsense-84cf0b3ebfd88b561649d333811da52e92039498.tar.gz
Use exec()
-rwxr-xr-xetc/ecl.php6
-rw-r--r--etc/phpshellsessions/externalconfiglocator4
2 files changed, 4 insertions, 6 deletions
diff --git a/etc/ecl.php b/etc/ecl.php
index d879266..9f68919 100755
--- a/etc/ecl.php
+++ b/etc/ecl.php
@@ -38,14 +38,14 @@ $debug = false;
function get_boot_disk() {
global $g, $debug;
- $disk = `/sbin/mount | /usr/bin/grep "on / " | /usr/bin/cut -d'/' -f3 | /usr/bin/cut -d' ' -f1`;
+ $disk = exec("/sbin/mount | /usr/bin/grep \"on / \" | /usr/bin/cut -d'/' -f3 | /usr/bin/cut -d' ' -f1");
return $disk;
}
function get_disk_slices($disk) {
global $g, $debug;
$slices_array = array();
- $slices = trim(`/bin/ls /dev/{$disk}s* 2>/dev/null`);
+ $slices = trim(exec("/bin/ls /dev/{$disk}s* 2>/dev/null"));
$slices = str_replace("/dev/", "", $slices);
if($slices == "ls: No match.")
return;
@@ -56,7 +56,7 @@ function get_disk_slices($disk) {
function get_disks() {
global $g, $debug;
$disks_array = array();
- $disks = `/sbin/sysctl kern.disks | cut -d':' -f2`;
+ $disks = exec("/sbin/sysctl kern.disks | cut -d':' -f2");
$disks_s = explode(" ", $disks);
foreach($disks_s as $disk)
if(trim($disk))
diff --git a/etc/phpshellsessions/externalconfiglocator b/etc/phpshellsessions/externalconfiglocator
index 8a60867..84534b3 100644
--- a/etc/phpshellsessions/externalconfiglocator
+++ b/etc/phpshellsessions/externalconfiglocator
@@ -1,5 +1,3 @@
-global $config;
-$config = parse_config(true);
+include("/etc/ecl.php");
-require("/etc/ecl.php");
OpenPOWER on IntegriCloud