summaryrefslogtreecommitdiffstats
path: root/usr/local/www/index.php
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2006-02-27 03:28:43 +0000
committerScott Ullrich <sullrich@pfsense.org>2006-02-27 03:28:43 +0000
commit746ca58a1c48e5b2f8d604b4dad5afcb0cbce12b (patch)
treefc37e86d49a0a580673132c3920921dffba9c2fe /usr/local/www/index.php
parent65b8734aef28969b946b2d2007760ed516e53047 (diff)
downloadpfsense-746ca58a1c48e5b2f8d604b4dad5afcb0cbce12b.zip
pfsense-746ca58a1c48e5b2f8d604b4dad5afcb0cbce12b.tar.gz
Check if file exists before running command
Diffstat (limited to 'usr/local/www/index.php')
-rwxr-xr-xusr/local/www/index.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/usr/local/www/index.php b/usr/local/www/index.php
index 65afb5f..43cc751 100755
--- a/usr/local/www/index.php
+++ b/usr/local/www/index.php
@@ -56,8 +56,10 @@
## Check to see if we have a swap space,
## if true, display, if false, hide it ...
- $swapinfo = `/usr/sbin/swapinfo`;
- if(stristr($swapinfo,'%') == true) $showswap=true;
+ if(file_exists("/usr/sbin/swapinfo")) {
+ $swapinfo = `/usr/sbin/swapinfo`;
+ if(stristr($swapinfo,'%') == true) $showswap=true;
+ }
## User recently restored his config.
OpenPOWER on IntegriCloud