Implement Client configuration

- add mobile date network devices and configuration
- add client configuration via udev
- add GUI under networking tab
- add scripts to handle mobile data devices
This commit is contained in:
Christian Zeitnitz
2021-03-07 18:36:48 +01:00
parent 6d635a96d5
commit 8b0383dd20
24 changed files with 2766 additions and 114 deletions

View File

@@ -728,5 +728,15 @@ function getNightmode(){
} else {
return false;
}
// search array for matching string and return only first matching group
function preg_only_match($pat,$haystack) {
$match = "";
if(!empty($haystack) && !empty($pat)) {
if(!is_array($haystack)) $haystack = array($haystack);
$str = preg_grep($pat,$haystack);
if (!empty($str) && preg_match($pat,array_shift($str),$match) === 1 ) $match = $match[1];
}
return $match;
}
}