summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRenato Botelho <renato@netgate.com>2015-07-17 09:29:38 -0300
committerRenato Botelho <renato@netgate.com>2015-07-17 09:29:38 -0300
commitf84945f329bc03d5b234bf9da399941dbe69220c (patch)
tree55a387e2d52a20a4db7c26fe56e560a4c2f2ecf8
parenta296286b431b54ae66e655553ace17e857332b1f (diff)
parent8235e7304e97a750e1a48926c69e65b4836cbffa (diff)
downloadpfsense-f84945f329bc03d5b234bf9da399941dbe69220c.zip
pfsense-f84945f329bc03d5b234bf9da399941dbe69220c.tar.gz
Merge pull request #1758 from phil-davis/patch-2
-rw-r--r--usr/local/www/interfaces_ppps_edit.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/usr/local/www/interfaces_ppps_edit.php b/usr/local/www/interfaces_ppps_edit.php
index 44d44a0..2a7eaf9 100644
--- a/usr/local/www/interfaces_ppps_edit.php
+++ b/usr/local/www/interfaces_ppps_edit.php
@@ -491,11 +491,11 @@ $types = array("select" => gettext("Select"), "ppp" => "PPP", "pppoe" => "PPPoE"
}
// $serialports = pfSense_get_modem_devices();
// Match files in /dev starting with "cua" then:
- // ? = any single character e.g. like "cuau"
+ // [a-zA-Z] = any single alpha character e.g. like "cuau"
// [0-9] = a digit from 0 to 9
- // {,[0-9]} = nothing (the empty before the comma) or a digit from 0 to 9
- // This supports up to 100 devices (0 to 99), e.g. cuau0 cuau1 ... cuau10 cuau11 ... cuau99
- $serialports = glob("/dev/cua?[0-9]{,[0-9]}", GLOB_BRACE);
+ // stuff in {} = the various possible digit and dot combinations to allow an optional 2nd digit, dot, followed by 1 or 2 optional digits
+ // This supports up to 100 device numbers (0 to 99), e.g. cuau0 cuau1 ... cuau10 cuau11 ... cuau99 and also possibilities like cuau1.1 cuau1.11 cuau11.1 cuau11.11
+ $serialports = glob("/dev/cua[a-zA-Z][0-9]{,.[0-9],.[0-9][0-9],[0-9],[0-9].[0-9],[0-9].[0-9][0-9]}", GLOB_BRACE);
$serport_count = 0;
foreach ($serialports as $port) {
$serport_count++;
OpenPOWER on IntegriCloud