r4254 Move "gateway" directory out of "wwwroot" and provide a mean to reconfigure
authorDenis Ovsienko <infrastation@yandex.ru>
Thu, 24 Feb 2011 11:49:23 +0000 (11:49 +0000)
committerDenis Ovsienko <infrastation@yandex.ru>
Thu, 24 Feb 2011 11:49:23 +0000 (11:49 +0000)
the system for the new location.

17 files changed:
gateways/deviceconfig/fdry5.connector [moved from wwwroot/gateways/deviceconfig/fdry5.connector with 100% similarity]
gateways/deviceconfig/ios12.connector [moved from wwwroot/gateways/deviceconfig/ios12.connector with 100% similarity]
gateways/deviceconfig/main [moved from wwwroot/gateways/deviceconfig/main with 100% similarity]
gateways/deviceconfig/nc.pl [moved from wwwroot/gateways/deviceconfig/nc.pl with 100% similarity]
gateways/deviceconfig/nxos4.connector [moved from wwwroot/gateways/deviceconfig/nxos4.connector with 100% similarity]
gateways/deviceconfig/switch.secrets.php-sample [moved from wwwroot/gateways/deviceconfig/switch.secrets.php-sample with 100% similarity]
gateways/deviceconfig/vrp53.connector [moved from wwwroot/gateways/deviceconfig/vrp53.connector with 100% similarity]
gateways/deviceconfig/vrp55.connector [moved from wwwroot/gateways/deviceconfig/vrp55.connector with 100% similarity]
gateways/deviceconfig/xos12.connector [moved from wwwroot/gateways/deviceconfig/xos12.connector with 100% similarity]
gateways/sendfile/main [moved from wwwroot/gateways/sendfile/main with 100% similarity]
gateways/switchvlans/cisco.connector [moved from wwwroot/gateways/switchvlans/cisco.connector with 100% similarity]
gateways/switchvlans/cisco.secrets.php-sample [moved from wwwroot/gateways/switchvlans/cisco.secrets.php-sample with 100% similarity]
gateways/switchvlans/main [moved from wwwroot/gateways/switchvlans/main with 100% similarity]
gateways/switchvlans/vlandecoder-sample [moved from wwwroot/gateways/switchvlans/vlandecoder-sample with 100% similarity]
gateways/switchvlans/vlantable-sample [moved from wwwroot/gateways/switchvlans/vlantable-sample with 100% similarity]
wwwroot/inc/gateways.php
wwwroot/inc/init.php

index 033144e..1a7a568 100644 (file)
@@ -73,7 +73,8 @@ $gwpushxlator = array
 // which explains the reason.
 function queryGateway ($gwname, $questions)
 {
-       $execpath = "./gateways/{$gwname}/main";
+       global $racktables_gwdir;
+       $execpath = "${racktables_gwdir}/gateways/{$gwname}/main";
        $dspec = array
        (
                0 => array ("pipe", "r"),
index ddf46d5..d9a3b6a 100644 (file)
@@ -17,6 +17,7 @@ require_once 'database.php';
 // care to set, something would be working anyway.
 $user_auth_src = 'database';
 $require_local_account = TRUE;
+$racktables_gwdir = '..';
 
 // (re)connects to DB, stores PDO object in $dbxlink global var
 function connectDB()