diff options
author | Ermal <eri@pfsense.org> | 2010-11-26 20:54:17 +0000 |
---|---|---|
committer | Ermal <eri@pfsense.org> | 2010-11-26 20:54:17 +0000 |
commit | 9a7f6731882c850a142bc082ebdfa3a7c321a3de (patch) | |
tree | c75df8d282d373085d8bc8b0314174ca3560d09a | |
parent | 7a7551569a67ee4150f086acf30c6c59ecda6dcb (diff) | |
download | pfsense-9a7f6731882c850a142bc082ebdfa3a7c321a3de.zip pfsense-9a7f6731882c850a142bc082ebdfa3a7c321a3de.tar.gz |
Use php_uname where possible.
-rw-r--r-- | etc/inc/globals.inc | 4 | ||||
-rw-r--r-- | etc/inc/pfsense-utils.inc | 6 | ||||
-rw-r--r-- | usr/local/www/installer.php | 5 |
3 files changed, 8 insertions, 7 deletions
diff --git a/etc/inc/globals.inc b/etc/inc/globals.inc index 8059c3f..bc3eed7 100644 --- a/etc/inc/globals.inc +++ b/etc/inc/globals.inc @@ -122,7 +122,7 @@ $iptos = array("lowdelay", "throughput", "reliability"); $tcpflags = array("syn", "ack", "fin", "rst", "psh", "urg"); if(file_exists("/etc/platform")) { - $arch = trim(`uname -m`); + $arch = php_uname("m"); $g['platform'] = trim(file_get_contents("/etc/platform")); if($g['platform'] == "nanobsd") { $g['update_url']="http://snapshots.pfsense.org/FreeBSD_RELENG_8_1/{$arch}/pfSense_HEAD/.updaters/"; @@ -167,4 +167,4 @@ $sysctls = array("net.inet.ip.portrange.first" => "1024", $config_parsed = false; -?>
\ No newline at end of file +?> diff --git a/etc/inc/pfsense-utils.inc b/etc/inc/pfsense-utils.inc index 1aa37b0..45cd2b9 100644 --- a/etc/inc/pfsense-utils.inc +++ b/etc/inc/pfsense-utils.inc @@ -1418,8 +1418,8 @@ function isvm() { } function get_freebsd_version() { - $version = trim(`/usr/bin/uname -r | /usr/bin/cut -d'.' -f1`); - return $version; + $version = php_uname("r"); + return $version[0]; } function download_file_with_progress_bar($url_file, $destination_file, $readbody = 'read_body') { @@ -2121,4 +2121,4 @@ function filter_rules_compare($a, $b) { return compare_interface_friendly_names($a['interface'], $b['interface']); } -?>
\ No newline at end of file +?> diff --git a/usr/local/www/installer.php b/usr/local/www/installer.php index aa3b9c0..68570ac 100644 --- a/usr/local/www/installer.php +++ b/usr/local/www/installer.php @@ -645,7 +645,8 @@ EOF; $custom_txt .= "<tr><td align='right'><b>Filesystem type:</td><td><select name='fstype'>\n"; $custom_txt .= "<option value='UFS'>UFS</option>\n"; $custom_txt .= "<option value='UFS+S'>UFS + Softupdates</option>\n"; - $release = trim(`uname -r | cut -d'.' -f1`); + $release = php_uname("r"); + $release = $release[0]; if($release == "9") $custom_txt .= "<option value='UFS+J'>UFS + Journaling</option>\n"; if(file_exists("/boot/gptzfsboot")) @@ -749,4 +750,4 @@ EOF; end_html(); } -?>
\ No newline at end of file +?> |