diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2008-08-31 21:46:56 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2008-08-31 21:46:56 +0000 |
commit | b3251a0c8de49d3a2f62369168b5f4bda9f15c81 (patch) | |
tree | b891e39c25412e00b8c8c186d2d45c2463febeb1 /etc | |
parent | 9f85112d1dc79be64d8bd638d275ce6135ff4aca (diff) | |
download | pfsense-b3251a0c8de49d3a2f62369168b5f4bda9f15c81.zip pfsense-b3251a0c8de49d3a2f62369168b5f4bda9f15c81.tar.gz |
* Do not return on CDROM platform
* Use @ to send error to /dev/null
Diffstat (limited to 'etc')
-rw-r--r-- | etc/inc/pfsense-utils.inc | 48 |
1 files changed, 20 insertions, 28 deletions
diff --git a/etc/inc/pfsense-utils.inc b/etc/inc/pfsense-utils.inc index cd3532b..2893354 100644 --- a/etc/inc/pfsense-utils.inc +++ b/etc/inc/pfsense-utils.inc @@ -1829,30 +1829,25 @@ function convert_friendly_interface_to_friendly_descr($interface) { global $config; switch ($interface) { - case "pptp": - $ifdesc = "PPTP"; - break; - case "pppoe": - $ifdesc = "PPPoE"; - break; - case "openvpn": - $ifdesc = "OpenVPN"; - break; - case "enc0": - $ifdesc = "IPsec"; - break; - /* XXX: dial in support?! - case "ppp": - $ifdesc = "PPP"; - break; - */ + case "pptp": + $ifdesc = "PPTP"; + break; + case "pppoe": + $ifdesc = "PPPoE"; + break; + case "openvpn": + $ifdesc = "OpenVPN"; + break; + case "enc0": + case "ipsec": + $ifdesc = "IPsec"; + break; default: /* if list */ $ifdescrs = get_configured_interface_with_descr(); - foreach ($ifdescrs as $if => $ifname) { - if ($if == $interface || $ifname == $interface) - return $ifname; + if ($if == $interface || $ifname == $interface) + return $ifname; } break; } @@ -2190,14 +2185,11 @@ function get_memory() { function safe_mkdir($path, $mode=0755) { global $g; - /* cdrom is ro. */ - if($g['platform'] == "cdrom") - return false; - - if (!is_file($path) && !is_dir($path)) - return mkdir($path, $mode); - else + if (!is_file($path) && !is_dir($path)) { + return @mkdir($path, $mode); + } else { return false; + } } /* @@ -3982,4 +3974,4 @@ function read_body($ch, $string) { return $length; } -?> +?>
\ No newline at end of file |