From 0be70026d569a8fea92b5901479e809c15f312aa Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 31 Oct 2011 09:03:30 +0100 Subject: osinventory, improves packaging + disable snmp --- ocsinventory-dbconf.patch | 88 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 88 insertions(+) create mode 100644 ocsinventory-dbconf.patch (limited to 'ocsinventory-dbconf.patch') diff --git a/ocsinventory-dbconf.patch b/ocsinventory-dbconf.patch new file mode 100644 index 0000000..2312f8a --- /dev/null +++ b/ocsinventory-dbconf.patch @@ -0,0 +1,88 @@ +diff -up ocsreports/install.php.var ocsreports/install.php +--- ocsreports/install.php.var 2011-10-31 08:42:38.914660647 +0100 ++++ ocsreports/install.php 2011-10-31 08:44:55.353669573 +0100 +@@ -96,9 +96,9 @@ if( isset($_POST["name"])) { + else + $instOk = true; + } +-if( $hnd = @fopen("dbconfig.inc.php", "r") ) { ++if( $hnd = @fopen(CONF_MYSQL, "r") ) { + fclose($hnd); +- require("dbconfig.inc.php"); ++ require(CONF_MYSQL); + if (defined('COMPTE_BASE')) { // Upgrade from 2.0.x + $valNme = COMPTE_BASE; + } else if (isset($_SESSION["COMPTE_BASE"])) { // Upgrade from 1.3.x +@@ -188,7 +188,7 @@ if($_POST["fin"]=="fin") { + . "
"; + + echo "
" . $l->g(2065) . "
"; +- unlink("dbconfig.inc.php"); ++ unlink(CONF_MYSQL); + } + else { + msg_success("" . $l->g(2050) . "

" . $l->g(2051) . ""); +@@ -197,7 +197,7 @@ if($_POST["fin"]=="fin") { + } + + +-if(!$ch = @fopen("dbconfig.inc.php","w")) { ++if(!$ch = @fopen(CONF_MYSQL,"w")) { + echo "
" . $l->g(2052) . "
"; + die(); + } +@@ -424,7 +424,7 @@ if( ! $erralter ) { + + if($nberr) { + echo "
" . $l->g(2065) . "
"; +- unlink("dbconfig.inc.php"); ++ unlink(CONF_MYSQL); + die(); + } + $nberr=0; +@@ -469,7 +469,7 @@ foreach($filenames as $fil) { + " " . $l->g(2068) . + ""; + echo "
" . $l->g(2065) . "
"; +- unlink("dbconfig.inc.php"); ++ unlink(CONF_MYSQL); + die(); + } + echo "
" . $l->g(2001) . +@@ -505,7 +505,7 @@ else + + if($nberr) { + echo "
" . $l->g(2065) . "
"; +- unlink("dbconfig.inc.php"); ++ unlink(CONF_MYSQL); + die(); + } + +diff -up ocsreports/require/header.php.var ocsreports/require/header.php +--- ocsreports/require/header.php.var 2011-10-31 08:42:31.249548540 +0100 ++++ ocsreports/require/header.php 2011-10-31 08:43:52.704407954 +0100 +@@ -25,7 +25,6 @@ if(substr($_SERVER['DOCUMENT_ROOT'],-1) + }else{ + define("DOCUMENT_ROOT",$_SERVER['DOCUMENT_ROOT']); + } +-//echo DOCUMENT_ROOT."
".DOCUMENT_REAL_ROOT; + //print_r($_SERVER); + + if ($_SESSION['OCS']['LOG_GUI'] == 1){ +@@ -72,14 +71,14 @@ if (isset($_POST['LOGOUT']) and $_POST[' + } + + /***************************************************** First installation checking *********************************************************/ +-if( (!$fconf=@fopen("dbconfig.inc.php","r")) ++if( (!$fconf=@fopen(CONF_MYSQL,"r")) + || (!function_exists('session_start')) + || (!function_exists('mysql_connect')) ) { + require('install.php'); + die(); + } + else{ +- require_once('dbconfig.inc.php'); ++ require_once(CONF_MYSQL); + fclose($fconf); + } + -- cgit