Changeset 249

Show
Ignore:
Timestamp:
05/23/07 17:50:13 (2 years ago)
Author:
ludo
Message:

paths fixed. added some config options for glpi. (from r4438)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/webmin/lrs-inventory/agent/_relpos.php

    r247 r249  
    11<? 
    2 $phproot = "/var/www/glpi"
     2$phproot = $config["glpi_dir"]
    33?> 
  • trunk/webmin/lrs-inventory/agent/importGLPI.php

    r247 r249  
    2121# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA. 
    2222 
     23# LRS paths init 
     24include_once(dirname(__FILE__).'/../../lbs_common/lbs_common.php'); 
     25$config = lib_read_file("/etc/webmin/lrs-inventory/config"); 
     26 
    2327# GLPI init 
    2428$NEEDED_ITEMS=array("computer", "device", "link", "monitor", "enterprise", "printer", "peripheral"); 
     
    3135# LRS Inventory init 
    3236error_reporting(E_ALL); 
    33 include_once('/usr/share/webmin/lrs-inventory/classes/DataSource.php'); 
     37include_once(dirname(__FILE__).'/../classes/DataSource.php'); 
    3438$datasource = & DataSource::getDefaultDataSource(); 
    35 $mach = "TEST__LDM"; 
    36  
    3739 
    3840/** 
     
    570572} 
    571573 
    572 import($argv[1]); 
    573  
     574if (isset($argv[1]) && $config["glpi_sync"])  
     575    import($argv[1]); 
     576else 
     577    print "Error: no host given on command line or GLPI sync disabled.\n"; 
    574578?> 
  • trunk/webmin/lrs-inventory/config

    r208 r249  
    55genfromocs=0 
    66keep=20 
     7glpi_sync=0 
     8glpi_dir=/var/www/glpi 
  • trunk/webmin/lrs-inventory/config.info

    r208 r249  
    55genfromocs=Show general information using:,1,1-OCS Inventory,0-PXE Boot Inventory 
    66keep=Number of inventories to keep in the database (by host),0 
     7glpi_sync=Enable the GLPI synchronization,1,1-Yes,0-No 
     8glpi_dir=GLPI installation directory,0 
  • trunk/webmin/lrs-inventory/config.info.fr

    r208 r249  
    55genfromocs=Afficher les informations générales en utilisant:,1,1-L'inventaire OCS,0-L'inventaire au boot PXE 
    66keep=Nombre d'inventaires conservés dans la BDD (par machine),0 
     7glpi_sync=Activer la synchro avec GLPI,1,1-Oui,0-Non 
     8glpi_dir=Répertoire d'installation GLPI,0 
  • trunk/webmin/lrs-inventory/lbs-inventory.php

    r133 r249  
    2020# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA. 
    2121 
    22 include_once('classes/DataSource.php'); 
    23 include_once('../lbs_common/lbs_common.php'); 
    24 include_once('path.cgi'); 
     22include_once(dirname(__FILE__).'/classes/DataSource.php'); 
     23include_once(dirname(__FILE__).'/../lbs_common/lbs_common.php'); 
     24include_once(dirname(__FILE__).'/path.cgi'); 
    2525 
    2626?>