Adjust the provisioning for the new filename {$mac} syntax.

This commit is contained in:
Mark Crane
2013-11-10 07:26:18 +00:00
parent eec49f72a4
commit b1599f7046
2 changed files with 11 additions and 11 deletions
+6 -6
View File
@@ -285,14 +285,14 @@ include "resources/classes/template.php";
//if $file is not provided then look for a default file that exists
if (strlen($file) == 0) {
if (file_exists($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH."/resources/templates/provision/".$device_template ."/{v_mac}")) {
$file = "{v_mac}";
if (file_exists($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH."/resources/templates/provision/".$device_template ."/{\$mac}")) {
$file = "{\$mac}";
}
elseif (file_exists($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH."/resources/templates/provision/".$device_template ."/{v_mac}.xml")) {
$file = "{v_mac}.xml";
elseif (file_exists($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH."/resources/templates/provision/".$device_template ."/{\$mac}.xml")) {
$file = "{\$mac}.xml";
}
elseif (file_exists($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH."/resources/templates/provision/".$device_template ."/{v_mac}.cfg")) {
$file = "{v_mac}.cfg";
elseif (file_exists($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH."/resources/templates/provision/".$device_template ."/{\$mac}.cfg")) {
$file = "{\$mac}.cfg";
}
else {
echo "file not found";