Code

1.4.5 working, but need some more work:
authorwob-guest <wob-guest@98d490a6-b407-0410-aaaa-fdee166ba3f5>
Sat, 28 Nov 2009 10:48:44 +0000 (10:48 +0000)
committerwob-guest <wob-guest@98d490a6-b407-0410-aaaa-fdee166ba3f5>
Sat, 28 Nov 2009 10:48:44 +0000 (10:48 +0000)
- testing on unstable
- avoid *** WARNING: ucf was run from a maintainer script that uses debconf
- maybe auto move user installed templates to new location

git-svn-id: svn://svn.debian.org/svn/pkg-nagios/nagvis/trunk@1795 98d490a6-b407-0410-aaaa-fdee166ba3f5

17 files changed:
debian/README.Debian
debian/README.backends.Merlin [new file with mode: 0644]
debian/apache.conf
debian/changelog
debian/control
debian/copyright
debian/dirs
debian/docs
debian/examples
debian/links
debian/patches/00list
debian/patches/10_pathnames.dpatch [new file with mode: 0755]
debian/patches/20_configpath.dpatch [new file with mode: 0755]
debian/patches/pathnames.dpatch [deleted file]
debian/postinst
debian/postrm
debian/rules

index 20ec66c10f59b51052c44cc07b1e03209b6cf656..9aefffcbfc609b5da5405ebd7088ad04a476bd1c 100644 (file)
@@ -18,3 +18,34 @@ functionality. Just copy the files in demo/ to the appropriate location and chan
 its owner and group to be www-data:www-data.
 
  -- Hendrik Frenzel <hfrenzel@scunc.net>  Sat, 14 Jul 2007 11:27:33 +0200
+
+Starting with 1.4.5, there are changes from older packages.
+
+* URL and CGI-Path:
+Since nagvis now can be used with other systems like icinga or web interface 
+like ninja, the htdocs path is no longer part of nagios3 directory structure. 
+The new directory for nagvis is now /usr/share/nagvis/htdocs/nagvis. The 
+authentification therefore has to be configured separately. Have a look at 
+/etc/nagvis/apache.conf and edit it for your needs.
+
+* Templates:
+The template directory /etc/nagvis/templates has moved back to 
+/usr/share/nagvis/htdocs/nagvis/templates, images for templates now located in
+/usr/share/nagvis/htdocs/nagvis/images/templates
+
+If you installed your own templates in /etc/nagvis/templates, proceed the 
+following steps:
+
+- cp /etc/nagios/templates/header/*.png \
+  /usr/share/nagvis/htdocs/nagvis/images/templates/header/
+
+- cp /etc/nagios/templates/hover/*.png \
+  /usr/share/nagvis/htdocs/nagvis/images/templates/hover/
+
+- /etc/nagios/templates/header/*.{css,html}
+  /usr/share/nagvis/htdocs/nagvis/templates/header/
+
+- /etc/nagios/templates/hover/*.{css,html}
+  /usr/share/nagvis/htdocs/nagvis/templates/hover/
+
+ -- Wolfgang Barth <wob@swobspace.net>  Sat, 28 Nov 2009 12:00:00 +0200
diff --git a/debian/README.backends.Merlin b/debian/README.backends.Merlin
new file mode 100644 (file)
index 0000000..c1a43ec
--- /dev/null
@@ -0,0 +1,25 @@
+Starting with 1.4 NagVis supports Merlin as a replacement to ndoutils.
+Simply set backendtype to merlinmy, the rest of configuration is similar 
+to ndoutils.
+
+Here is an example:
+
+; in this example the ID of the Backend is "merlinmy_1" you can define another ID.
+[backend_merlinmy_1]
+; type of backend - MUST be set
+;backendtype="merlinmy"
+; hostname for Merlin db
+;dbhost="localhost"
+; portname for Merlin db
+;dbport=3306
+; database name for Merlin db
+;dbname="merlin"
+; username for Merlin db
+;dbuser="merlin"
+; password for Merlin db
+;dbpass="merlin"
+; maximum delay of the Merlin Database in seconds
+;maxtimewithoutupdate=180
+; path to the cgi-bin of this backend
+;htmlcgi="/nagios/cgi-bin"
+
index 8d21c711e02bbb1105e87df2b972e6f41ce3907a..16e5bcb63a03427a6b99b3c4d446758a3719d743 100644 (file)
@@ -1,4 +1,20 @@
-<Location /nagios3/nagvis>
+# -- new style
+Alias /nagvis /usr/share/nagvis/htdocs
+
+# -- backward compatibility
+Alias /nagios3/nagvis /usr/share/nagvis/htdocs
+
+# -- use basic authentification from nagios3 package
+#    please adapt to your needs
+<Directory /usr/share/nagvis/htdocs>
+        Options FollowSymLinks
        DirectoryIndex index.php
-</Location>
 
+        Order Allow,Deny
+        Allow From All
+
+        AuthName "NagVis Access"
+        AuthType Basic
+        AuthUserFile /etc/nagios3/htpasswd.users
+       require valid-user
+</Directory>
index 27a58e992f5939d106b3a1e311c92a0de2ed5de6..c939dbc01fc2f9999b6578f9ff1a0c8e9440023a 100644 (file)
@@ -3,6 +3,14 @@ nagvis (1:1.4.5-1) UNRELEASED; urgency=low
   * (NOT RELEASED YET) New upstream release
   [ Wolfgang Barth ]
   * New upstream version
+  * switching location of templates from /etc/nagvis/templates back to
+    /usr/share/nagvis/htdocs/nagvis/templates
+  * User uploaded maps now in /var/lib/nagvis/images/maps 
+    (1.3.1: /etc/maps) to avoid security problems
+  * Cache location nagvis/var ist now /var/cache/nagvis
+  * nagios independent htmlbase /nagvis and corresponding apache.conf
+    linked to /etc/apache2/conf.d
+  * README.backends.Merlin added
 
  -- Wolfgang Barth <wob@swobspace.net>  Sat, 28 Nov 2009 09:23:36 +0100
 
index f1eaecf830f4a8a9decca3c08fa42f53e1af1ada..acba687fa5c2893abec429ca8fda002bab59536f 100644 (file)
@@ -1,7 +1,7 @@
 Source: nagvis
 Section: net
 Priority: extra
-Maintainer: Wolfgang Barth <wob@swobspace.net>
+Maintainer: Debian Nagios Maintainer Group <pkg-nagios-devel@lists.alioth.debian.org>
 Uploaders: Debian Nagios Maintainer Group <pkg-nagios-devel@lists.alioth.debian.org>, Jan Wagner <waja@cyconet.org>, Alexander Wirt <formorer@debian.org>
 Build-Depends: debhelper (>= 5), dpatch
 Standards-Version: 3.8.3
index 86a0538a2cda22851f70ecca7a9c6ad1afe51a83..7987d1a3788f8fa2bfff91a0f45a9cd4ae5f4638 100644 (file)
@@ -1,4 +1,5 @@
 This package was debianized by Hendrik Frenzel <hfrenzel@scunc.net>
+and updated by Wolfgang Barth <wob@swobspace@net>
 
 Files: *
 Copyright:
@@ -60,6 +61,7 @@ License: LGPL-2.1
 
 Files: debian/*
 Copyright: © 2007-2008 Hendrik Frenzel <hfrenzel@scunc.net>
+and updated 2009 by Wolfgang Barth <wob@swobspace.net>
 License: GPL-2+
  The Debian packaging information is under the GPL, version 2 or later.
  .
index 88bd9fdbbca39a3599d4bbc7a197b76b9e38072b..6ec1f2a345fe1c01ef5614f36b5468ee24fc886a 100644 (file)
@@ -1,3 +1,4 @@
 etc/nagvis/maps
 etc/nagvis/templates
-var/lib/nagvis
+var/lib/nagvis/images/maps
+var/cache/nagvis
index e845566c06f9bf557d35e8292c37cf05d97a9769..d306c607a4cd88ad978ff60e839cee9a892e65f0 100644 (file)
@@ -1 +1,2 @@
 README
+docs/Changelog
index 0d3332484e2cf3a3f02111925808b98bce330a7c..41159398a17f1279eb375d206f9a2b6283e2d2ce 100644 (file)
@@ -1 +1,2 @@
 debian/tmp/demo
+etc/nagvis.ini.php-sample
index 8daf3e72ead1178f5961aa3e3e242d544699d82a..0f234fe04b0b5a7320f29751f26ad861ec2b56b5 100644 (file)
@@ -1,6 +1,4 @@
 etc/nagvis/maps usr/share/nagvis/htdocs/nagvis/etc/maps
-etc/nagvis/maps usr/share/nagvis/htdocs/nagvis/images/maps
-etc/nagvis/templates usr/share/nagvis/htdocs/nagvis/etc/templates
-etc/nagvis/templates usr/share/nagvis/htdocs/nagvis/images/templates
-usr/share/nagvis/htdocs usr/share/nagios3/htdocs/nagvis
-var/lib/nagvis usr/share/nagvis/htdocs/var
+var/lib/nagvis/images/maps usr/share/nagvis/htdocs/nagvis/images/maps
+var/cache/nagvis usr/share/nagvis/htdocs/var
+etc/nagvis/apache.conf etc/apache2/conf.d/nagvis.conf 
index a35e952cc88c0c313fabe2dad68437927b301b9c..a02cbdb0bfa17b8f1f1e4b64a31c7951543b3153 100644 (file)
@@ -1 +1,2 @@
-pathnames
+10_pathnames.dpatch
+20_configpath.dpatch
diff --git a/debian/patches/10_pathnames.dpatch b/debian/patches/10_pathnames.dpatch
new file mode 100755 (executable)
index 0000000..912513a
--- /dev/null
@@ -0,0 +1,96 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 10_pathnames.dpatch by Wolfgang Barth <wob@swobspace.net>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+@DPATCH@
+diff -urNad trunk~/etc/nagvis.ini.php-sample trunk/etc/nagvis.ini.php-sample
+--- trunk~/etc/nagvis.ini.php-sample   2009-11-27 16:41:36.000000000 +0100
++++ trunk/etc/nagvis.ini.php-sample    2009-11-27 18:35:57.000000000 +0100
+@@ -24,17 +24,20 @@
+ ; Path definitions
+ [paths]
+-; absolute physical NagVis path
+-;base="/usr/local/nagios/share/nagvis/"
++base="/usr/share/nagvis/htdocs/"
++cfg="/etc/nagvis/"
++var="/var/cache/nagvis/"
++map="/var/lib/nagvis/images/maps/"
++mapcfg="/etc/nagvis/maps/"
+ ; absolute html NagVis path
+-;htmlbase="/nagios/nagvis"
++htmlbase="/nagvis"
+ ; absolute html NagVis cgi path
+-;htmlcgi="/nagios/cgi-bin"
++htmlcgi="/nagios3/cgi-bin"
+ ; Default values which get inherited to the maps and its objects
+ [defaults]
+ ; default backend (id of the default backend)
+-;backend="ndomy_1"
++backend="ndomy_1"
+ ; background color of maps
+ ;backgroundcolor="#fff"
+ ; Enable/Disable the context menu on map objects. With the context menu you are
+@@ -123,7 +126,7 @@
+ ; Default root host (NagVis uses this if it can't detect it via NDO)
+ ;defaultroot=""
+ ; Path to the graphviz binaries (dot,neato,...); Only needed if not in ENV PATH
+-;graphvizpath="/usr/bin/"
++graphvizpath="/usr/bin"
+ ; Show the automap in the lists (Map index and dropdown menu in header)
+ ;showinlists=1
+@@ -158,8 +161,8 @@
+ ; ----------------------------
+ ; Example definition of a livestatus backend. In this case the backend_id is live_1
+-[backend_live_1]
+-backendtype="mklivestatus"
++;[backend_live_1]
++;backendtype="mklivestatus"
+ ;socket="unix:/usr/local/nagios/var/rw/live"
+ ; in this example the ID of the Backend is "ndomy_1" you can define another ID.
+@@ -186,9 +189,9 @@
+ ;htmlcgi="/nagios/cgi-bin"
+ ; in this example the ID of the Backend is "ndo2fs_1" you can define another ID.
+-[backend_ndo2fs_1]
++;[backend_ndo2fs_1]
+ ; type of backend - MUST be set
+-backendtype="ndo2fs"
++;backendtype="ndo2fs"
+ ; Path to the ndo2fs var directory where the VOLATILE and PERSISTENT directories are
+ ;path="/usr/local/ndo2fs/var"
+ ; Name of the instance to get the data from
+@@ -199,9 +202,9 @@
+ ;htmlcgi="/nagios/cgi-bin"
+ ; in this example the ID of the Backend is "merlinmy_1" you can define another ID.
+-[backend_merlinmy_1]
++;[backend_merlinmy_1]
+ ; type of backend - MUST be set
+-backendtype="merlinmy"
++;backendtype="merlinmy"
+ ; hostname for Merlin db
+ ;dbhost="localhost"
+ ; portname for Merlin db
+@@ -223,12 +226,12 @@
+ ; in this example the browser switches between the maps demo and demo2 every 15
+ ; seconds, the rotation is enabled by url: index.php?rotation=demo
+-[rotation_demo]
++;[rotation_demo]
+ ; These steps are rotated. The "Demo2:" is a label which is being displayed in
+ ; the index pages rotation list.
+-maps="demo,Demo2:demo2"
++;maps="demo,Demo2:demo2"
+ ; rotation interval (seconds)
+-interval=15
++;interval=15
+ ; ------------------------------------------------------------------------------
+ ; Below you find some advanced stuff
diff --git a/debian/patches/20_configpath.dpatch b/debian/patches/20_configpath.dpatch
new file mode 100755 (executable)
index 0000000..aa67c8b
--- /dev/null
@@ -0,0 +1,26 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 20_configpath.dpatch by Wolfgang Barth <wob@swobspace.net>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+@DPATCH@
+diff -urNad trunk~/nagvis/includes/defines/global.php trunk/nagvis/includes/defines/global.php
+--- trunk~/nagvis/includes/defines/global.php  2009-11-27 16:41:36.000000000 +0100
++++ trunk/nagvis/includes/defines/global.php   2009-11-27 18:38:59.000000000 +0100
+@@ -61,13 +61,13 @@
+ define('DEBUGLEVEL', 4);
+ // Path to the debug file
+-define('DEBUGFILE', '../var/nagvis-debug.log');
++define('DEBUGFILE', '/var/log/nagvis-debug.log');
+ // NagVis Version
+ define('CONST_VERSION', '1.4.5');
+ // Path to the main configuration file
+-define('CONST_MAINCFG', '../etc/nagvis.ini.php');
++define('CONST_MAINCFG', '/etc/nagvis/nagvis.ini.php');
+ // Needed minimal PHP version
+ define('CONST_NEEDED_PHP_VERSION', '5.0');
diff --git a/debian/patches/pathnames.dpatch b/debian/patches/pathnames.dpatch
deleted file mode 100755 (executable)
index 5e0fe5a..0000000
+++ /dev/null
@@ -1,732 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## pathnames.dpatch by  <hfrenzel@scunc.net>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: No description.
-
-@DPATCH@
-diff -urNad nagvis-1.3.1~/etc/nagvis.ini.php-sample nagvis-1.3.1/etc/nagvis.ini.php-sample
---- nagvis-1.3.1~/etc/nagvis.ini.php-sample    2008-06-04 19:57:06.000000000 +0200
-+++ nagvis-1.3.1/etc/nagvis.ini.php-sample     2009-08-23 12:52:15.000000000 +0200
-@@ -84,11 +84,11 @@
- ; path options
- [paths]
- ; absolute physical NagVis path
--;base="/usr/local/nagios/share/nagvis/"
-+;base="/usr/share/nagvis/"
- ; absolute html NagVis path
--;htmlbase="/nagios/nagvis"
-+;htmlbase="/nagios3/nagvis"
- ; absolute html NagVis cgi path
--;htmlcgi="/nagios/cgi-bin"
-+;htmlcgi="/nagios3/cgi-bin"
- ; options for the NDO-Backend
- ; in this example the ID of the Backend is "ndomy_1" you can define another ID.
-@@ -112,7 +112,7 @@
- ; maximum delay of the NDO Database in Seconds
- ;maxtimewithoutupdate=180
- ; path to the cgi-bin of this backend
--;htmlcgi="/nagios/cgi-bin"
-+;htmlcgi="/nagios3/cgi-bin"
- ; map rotation pools
- ; in this example the browser switches between the maps demo and demo2 every 15
-diff -urNad nagvis-1.3.1~/nagvis/ajax_handler.php nagvis-1.3.1/nagvis/ajax_handler.php
---- nagvis-1.3.1~/nagvis/ajax_handler.php      2008-06-11 23:16:17.000000000 +0200
-+++ nagvis-1.3.1/nagvis/ajax_handler.php       2009-08-23 12:53:44.000000000 +0200
-@@ -26,45 +26,45 @@
- @session_start();
- // Include defines
--require("./includes/defines/global.php");
--require("./includes/defines/matches.php");
-+require("/usr/share/nagvis/includes/defines/global.php");
-+require("/usr/share/nagvis/includes/defines/matches.php");
- // Include functions
--require("./includes/functions/debug.php");
--require("./includes/functions/oldPhpVersionFixes.php");
--require("./includes/functions/getuser.php");
-+require("/usr/share/nagvis/includes/functions/debug.php");
-+require("/usr/share/nagvis/includes/functions/oldPhpVersionFixes.php");
-+require("/usr/share/nagvis/includes/functions/getuser.php");
- // Include needed global classes
--require("./includes/classes/GlobalMainCfg.php");
--require("./includes/classes/GlobalMapCfg.php");
--require("./includes/classes/GlobalLanguage.php");
--require("./includes/classes/GlobalPage.php");
--require("./includes/classes/GlobalMap.php");
--require("./includes/classes/GlobalBackground.php");
--require("./includes/classes/GlobalGraphic.php");
--require("./includes/classes/GlobalBackendMgmt.php");
-+require("/usr/share/nagvis/includes/classes/GlobalMainCfg.php");
-+require("/usr/share/nagvis/includes/classes/GlobalMapCfg.php");
-+require("/usr/share/nagvis/includes/classes/GlobalLanguage.php");
-+require("/usr/share/nagvis/includes/classes/GlobalPage.php");
-+require("/usr/share/nagvis/includes/classes/GlobalMap.php");
-+require("/usr/share/nagvis/includes/classes/GlobalBackground.php");
-+require("/usr/share/nagvis/includes/classes/GlobalGraphic.php");
-+require("/usr/share/nagvis/includes/classes/GlobalBackendMgmt.php");
- // Include needed nagvis classes
--require("./includes/classes/NagVisMapCfg.php");
--require("./includes/classes/NagVisMap.php");
--require("./includes/classes/NagVisFrontend.php");
--require("./includes/classes/NagVisAutoMap.php");
-+require("/usr/share/nagvis/includes/classes/NagVisMapCfg.php");
-+require("/usr/share/nagvis/includes/classes/NagVisMap.php");
-+require("/usr/share/nagvis/includes/classes/NagVisFrontend.php");
-+require("/usr/share/nagvis/includes/classes/NagVisAutoMap.php");
- // Include needed nagvis object classes
--require("./includes/classes/objects/NagVisObject.php");
--require("./includes/classes/objects/NagVisStatefulObject.php");
--require("./includes/classes/objects/NagVisStatelessObject.php");
--require("./includes/classes/objects/NagiosHost.php");
--require("./includes/classes/objects/NagVisHost.php");
--require("./includes/classes/objects/NagiosService.php");
--require("./includes/classes/objects/NagVisService.php");
--require("./includes/classes/objects/NagiosHostgroup.php");
--require("./includes/classes/objects/NagVisHostgroup.php");
--require("./includes/classes/objects/NagiosServicegroup.php");
--require("./includes/classes/objects/NagVisServicegroup.php");
--require("./includes/classes/objects/NagVisMapObj.php");
--require("./includes/classes/objects/NagVisShape.php");
--require("./includes/classes/objects/NagVisTextbox.php");
-+require("/usr/share/nagvis/includes/classes/objects/NagVisObject.php");
-+require("/usr/share/nagvis/includes/classes/objects/NagVisStatefulObject.php");
-+require("/usr/share/nagvis/includes/classes/objects/NagVisStatelessObject.php");
-+require("/usr/share/nagvis/includes/classes/objects/NagiosHost.php");
-+require("/usr/share/nagvis/includes/classes/objects/NagVisHost.php");
-+require("/usr/share/nagvis/includes/classes/objects/NagiosService.php");
-+require("/usr/share/nagvis/includes/classes/objects/NagVisService.php");
-+require("/usr/share/nagvis/includes/classes/objects/NagiosHostgroup.php");
-+require("/usr/share/nagvis/includes/classes/objects/NagVisHostgroup.php");
-+require("/usr/share/nagvis/includes/classes/objects/NagiosServicegroup.php");
-+require("/usr/share/nagvis/includes/classes/objects/NagVisServicegroup.php");
-+require("/usr/share/nagvis/includes/classes/objects/NagVisMapObj.php");
-+require("/usr/share/nagvis/includes/classes/objects/NagVisShape.php");
-+require("/usr/share/nagvis/includes/classes/objects/NagVisTextbox.php");
- /**
-  * This is a coustom error handling function for submitting PHP errors to the
-diff -urNad nagvis-1.3.1~/nagvis/draw.php nagvis-1.3.1/nagvis/draw.php
---- nagvis-1.3.1~/nagvis/draw.php      2008-06-05 23:11:33.000000000 +0200
-+++ nagvis-1.3.1/nagvis/draw.php       2009-08-23 12:52:15.000000000 +0200
-@@ -27,43 +27,43 @@
- @session_start();
- // Include defines
--require("./includes/defines/global.php");
--require("./includes/defines/matches.php");
-+require("/usr/share/nagvis/includes/defines/global.php");
-+require("/usr/share/nagvis/includes/defines/matches.php");
- // Include defines
--require("./includes/functions/debug.php");
--require("./includes/functions/oldPhpVersionFixes.php");
-+require("/usr/share/nagvis/includes/functions/debug.php");
-+require("/usr/share/nagvis/includes/functions/oldPhpVersionFixes.php");
- // Include needed global classes
--require("./includes/classes/GlobalGraphic.php");
--require("./includes/classes/GlobalMainCfg.php");
--require("./includes/classes/GlobalMapCfg.php");
--require("./includes/classes/GlobalMap.php");
--require("./includes/classes/GlobalPage.php");
--require("./includes/classes/GlobalBackground.php");
--require("./includes/classes/GlobalLanguage.php");
--require("./includes/classes/GlobalBackendMgmt.php");
-+require("/usr/share/nagvis/includes/classes/GlobalGraphic.php");
-+require("/usr/share/nagvis/includes/classes/GlobalMainCfg.php");
-+require("/usr/share/nagvis/includes/classes/GlobalMapCfg.php");
-+require("/usr/share/nagvis/includes/classes/GlobalMap.php");
-+require("/usr/share/nagvis/includes/classes/GlobalPage.php");
-+require("/usr/share/nagvis/includes/classes/GlobalBackground.php");
-+require("/usr/share/nagvis/includes/classes/GlobalLanguage.php");
-+require("/usr/share/nagvis/includes/classes/GlobalBackendMgmt.php");
- // Include needed frontend classes
--require("./includes/classes/NagVisMap.php");
--require("./includes/classes/NagVisBackground.php");
--require("./includes/classes/NagVisMapCfg.php");
-+require("/usr/share/nagvis/includes/classes/NagVisMap.php");
-+require("/usr/share/nagvis/includes/classes/NagVisBackground.php");
-+require("/usr/share/nagvis/includes/classes/NagVisMapCfg.php");
- // Include needed object classes
--require("./includes/classes/objects/NagVisObject.php");
--require("./includes/classes/objects/NagVisStatefulObject.php");
--require("./includes/classes/objects/NagVisStatelessObject.php");
--require("./includes/classes/objects/NagiosHost.php");
--require("./includes/classes/objects/NagVisHost.php");
--require("./includes/classes/objects/NagiosService.php");
--require("./includes/classes/objects/NagVisService.php");
--require("./includes/classes/objects/NagiosHostgroup.php");
--require("./includes/classes/objects/NagVisHostgroup.php");
--require("./includes/classes/objects/NagiosServicegroup.php");
--require("./includes/classes/objects/NagVisServicegroup.php");
--require("./includes/classes/objects/NagVisMapObj.php");
--require("./includes/classes/objects/NagVisShape.php");
--require("./includes/classes/objects/NagVisTextbox.php");
-+require("/usr/share/nagvis/includes/classes/objects/NagVisObject.php");
-+require("/usr/share/nagvis/includes/classes/objects/NagVisStatefulObject.php");
-+require("/usr/share/nagvis/includes/classes/objects/NagVisStatelessObject.php");
-+require("/usr/share/nagvis/includes/classes/objects/NagiosHost.php");
-+require("/usr/share/nagvis/includes/classes/objects/NagVisHost.php");
-+require("/usr/share/nagvis/includes/classes/objects/NagiosService.php");
-+require("/usr/share/nagvis/includes/classes/objects/NagVisService.php");
-+require("/usr/share/nagvis/includes/classes/objects/NagiosHostgroup.php");
-+require("/usr/share/nagvis/includes/classes/objects/NagVisHostgroup.php");
-+require("/usr/share/nagvis/includes/classes/objects/NagiosServicegroup.php");
-+require("/usr/share/nagvis/includes/classes/objects/NagVisServicegroup.php");
-+require("/usr/share/nagvis/includes/classes/objects/NagVisMapObj.php");
-+require("/usr/share/nagvis/includes/classes/objects/NagVisShape.php");
-+require("/usr/share/nagvis/includes/classes/objects/NagVisTextbox.php");
- // Load the main configuration
- $MAINCFG = new GlobalMainCfg(CONST_MAINCFG);
-diff -urNad nagvis-1.3.1~/nagvis/includes/classes/GlobalMainCfg.php nagvis-1.3.1/nagvis/includes/classes/GlobalMainCfg.php
---- nagvis-1.3.1~/nagvis/includes/classes/GlobalMainCfg.php    2008-08-13 21:45:26.000000000 +0200
-+++ nagvis-1.3.1/nagvis/includes/classes/GlobalMainCfg.php     2009-08-23 12:52:15.000000000 +0200
-@@ -173,7 +173,7 @@
-                                       'match' => MATCH_STRING_PATH),
-                               'var' => Array('must' => 0,
-                                       'editable' => 0,
--                                      'default' => '',
-+                                      'default' => '/var/lib/nagvis/',
-                                       'match' => MATCH_STRING_PATH),
-                               'mapcfg' => Array('must' => 0,
-                                       'editable' => 0,
-@@ -189,47 +189,47 @@
-                                       'match' => MATCH_STRING_PATH),
-                               'htmlbase' => Array('must' => 1,
-                                       'editable' => 1,
--                                      'default' => '/nagios/nagvis',
-+                                      'default' => '/nagios3/nagvis',
-                                       'match' => MATCH_STRING_PATH),
-                               'htmlcgi' => Array('must' => 1,
-                                       'editable' => 1,
--                                      'default' => '/nagios/cgi-bin',
-+                                      'default' => '/nagios3/cgi-bin',
-                                       'match' => MATCH_STRING_URL),
-                               'htmlimages' => Array('must' => 0,
-                                       'editable' => 0,
--                                      'default' => '/nagios/nagvis/nagvis/images/',
-+                                      'default' => '/nagios3/nagvis/nagvis/images/',
-                                       'match' => MATCH_STRING_PATH),
-                               'htmlhovertemplates' => Array('must' => 0,
-                                       'editable' => 0,
--                                      'default' => '/nagios/nagvis/nagvis/etc/templates/hover/',
-+                                      'default' => '/nagios3/nagvis/nagvis/etc/templates/hover/',
-                                       'match' => MATCH_STRING_PATH),
-                               'htmlheadertemplates' => Array('must' => 0,
-                                       'editable' => 0,
--                                      'default' => '/nagios/nagvis/nagvis/etc/templates/header/',
-+                                      'default' => '/nagios3/nagvis/nagvis/etc/templates/header/',
-                                       'match' => MATCH_STRING_PATH),                  
-                               'htmlhovertemplateimages' => Array('must' => 0,
-                                       'editable' => 0,
--                                      'default' => '/nagios/nagvis/nagvis/images/templates/hover/',
-+                                      'default' => '/nagios3/nagvis/nagvis/images/templates/hover/',
-                                       'match' => MATCH_STRING_PATH),
-                               'htmlheadertemplateimages' => Array('must' => 0,
-                                       'editable' => 0,
--                                      'default' => '/nagios/nagvis/nagvis/images/templates/header/',
-+                                      'default' => '/nagios3/nagvis/nagvis/images/templates/header/',
-                                       'match' => MATCH_STRING_PATH),
-                               'htmlicon' => Array('must' => 0,
-                                       'editable' => 0,
--                                      'default' => '/nagios/nagvis/nagvis/images/iconsets/',
-+                                      'default' => '/nagios3/nagvis/nagvis/images/iconsets/',
-                                       'match' => MATCH_STRING_PATH),
-                               'htmlshape' => Array('must' => 0,
-                                       'editable' => 0,
--                                      'default' => '/nagios/nagvis/nagvis/images/shape/',
-+                                      'default' => '/nagios3/nagvis/nagvis/images/shape/',
-                                       'match' => MATCH_STRING_PATH),
-                               'htmlmap' => Array('must' => 0,
-                                       'editable' => 0,
--                                      'default' => '/nagios/nagvis/nagvis/images/maps/',
-+                                      'default' => '/nagios3/nagvis/nagvis/images/maps/',
-                                       'match' => MATCH_STRING_PATH),
-                               'htmlvar' => Array('must' => 0,
-                                       'editable' => 0,
--                                      'default' => '/nagios/var/',
-+                                      'default' => '/nagios3/var/',
-                                       'match' => MATCH_STRING_PATH)),
-                       'backend' => Array(
-                               'backendtype' => Array('must' => 1,
-@@ -288,7 +288,7 @@
-                                                       'match' => MATCH_STRING_NO_SPACE),
-                                               'cgi' => Array('must' => 1,
-                                                       'editable' => 1,
--                                                      'default' => '/usr/local/nagios/sbin/',
-+                                                      'default' => '/usr/lib/cgi-bin/nagios3/',
-                                                       'match' => MATCH_STRING_PATH)))),
-                       'rotation' => Array(
-                               'rotationid' => Array('must' => 1,
-@@ -314,7 +314,7 @@
-                                       'match' => MATCH_STRING_NO_SPACE_EMPTY),
-                               'graphvizpath' => Array('must' => 0,
-                                       'editable' => 0,
--                                      'default' => '/usr/local/bin/',
-+                                      'default' => '/usr/bin/',
-                                       'match' => MATCH_STRING_PATH),
-                               'defaultparams' => Array('must' => 0,
-                                       'editable' => 0,
-@@ -361,15 +361,15 @@
-               $this->validConfig['paths']['images']['default'] = $base.'nagvis/images/';
-               $this->validConfig['paths']['shape']['default'] = $base.'nagvis/images/shapes/';
-               $this->validConfig['paths']['language']['default'] = $base.'nagvis/includes/languages/';
--              $this->validConfig['paths']['class']['default'] = $base.'nagvis/includes/classes/';
-+              $this->validConfig['paths']['class']['default'] = '/usr/share/nagvis/includes/classes/';
-               $this->validConfig['paths']['map']['default'] = $base.'nagvis/images/maps/';
--              $this->validConfig['paths']['var']['default'] = $base.'var/';
--              $this->validConfig['paths']['hovertemplate']['default'] = $base.'nagvis/templates/hover/';
--              $this->validConfig['paths']['headertemplate']['default'] = $base.'nagvis/templates/header/';
--              $this->validConfig['paths']['mapcfg']['default'] = $base.'etc/maps/';
-+              $this->validConfig['paths']['var']['default'] = '/var/lib/nagvis/';
-+              $this->validConfig['paths']['hovertemplate']['default'] = '/etc/nagvis/templates/hover/';
-+              $this->validConfig['paths']['headertemplate']['default'] = '/etc/nagvis/templates/header/';
-+              $this->validConfig['paths']['mapcfg']['default'] = $base.'nagvis/etc/maps/';
-               $this->validConfig['paths']['htmlimages']['default'] = $htmlBase.'/nagvis/images/';
--              $this->validConfig['paths']['htmlhovertemplates']['default'] = $htmlBase.'/nagvis/templates/hover/';
--              $this->validConfig['paths']['htmlheadertemplates']['default'] = $htmlBase.'/nagvis/templates/header/';
-+              $this->validConfig['paths']['htmlhovertemplates']['default'] = $htmlBase.'/nagvis/etc/templates/hover/';
-+              $this->validConfig['paths']['htmlheadertemplates']['default'] = $htmlBase.'/nagvis/etc/templates/header/';
-               $this->validConfig['paths']['htmlhovertemplateimages']['default'] = $this->validConfig['paths']['htmlimages']['default'].'templates/hover/';
-               $this->validConfig['paths']['htmlheadertemplateimages']['default'] = $this->validConfig['paths']['htmlimages']['default'].'templates/header/';
-               $this->validConfig['paths']['htmlicon']['default'] = $htmlBase.'/nagvis/images/iconsets/';
-diff -urNad nagvis-1.3.1~/nagvis/includes/defines/global.php nagvis-1.3.1/nagvis/includes/defines/global.php
---- nagvis-1.3.1~/nagvis/includes/defines/global.php   2008-08-22 21:01:15.000000000 +0200
-+++ nagvis-1.3.1/nagvis/includes/defines/global.php    2009-08-23 12:52:15.000000000 +0200
-@@ -37,13 +37,13 @@
- define('DEBUGLEVEL', 4);
- // Path to the debug file
--define('DEBUGFILE', '../var/nagvis-debug.log');
-+define('DEBUGFILE', '/var/log/nagvis-debug.log');
- // NagVis Version
- define('CONST_VERSION', '1.3.1');
- // Path to the main configuration file
--define('CONST_MAINCFG', '../etc/nagvis.ini.php');
-+define('CONST_MAINCFG', '/etc/nagvis/nagvis.ini.php');
- // Needed minimal PHP version
- define('CONST_NEEDED_PHP_VERSION', '5.0');
-diff -urNad nagvis-1.3.1~/nagvis/index.php nagvis-1.3.1/nagvis/index.php
---- nagvis-1.3.1~/nagvis/index.php     2008-06-05 23:11:33.000000000 +0200
-+++ nagvis-1.3.1/nagvis/index.php      2009-08-23 12:52:15.000000000 +0200
-@@ -26,44 +26,44 @@
- @session_start();
- // Include defines
--require("./includes/defines/global.php");
--require("./includes/defines/matches.php");
-+require("/usr/share/nagvis/includes/defines/global.php");
-+require("/usr/share/nagvis/includes/defines/matches.php");
- // Include functions
--require("./includes/functions/debug.php");
--require("./includes/functions/oldPhpVersionFixes.php");
-+require("/usr/share/nagvis/includes/functions/debug.php");
-+require("/usr/share/nagvis/includes/functions/oldPhpVersionFixes.php");
- // Include needed global classes
--require("./includes/classes/GlobalMainCfg.php");
--require("./includes/classes/GlobalMapCfg.php");
--require("./includes/classes/GlobalLanguage.php");
--require("./includes/classes/GlobalPage.php");
--require("./includes/classes/GlobalMap.php");
--require("./includes/classes/GlobalBackground.php");
--require("./includes/classes/GlobalGraphic.php");
--require("./includes/classes/GlobalBackendMgmt.php");
-+require("/usr/share/nagvis/includes/classes/GlobalMainCfg.php");
-+require("/usr/share/nagvis/includes/classes/GlobalMapCfg.php");
-+require("/usr/share/nagvis/includes/classes/GlobalLanguage.php");
-+require("/usr/share/nagvis/includes/classes/GlobalPage.php");
-+require("/usr/share/nagvis/includes/classes/GlobalMap.php");
-+require("/usr/share/nagvis/includes/classes/GlobalBackground.php");
-+require("/usr/share/nagvis/includes/classes/GlobalGraphic.php");
-+require("/usr/share/nagvis/includes/classes/GlobalBackendMgmt.php");
- // Include needed nagvis classes
--require("./includes/classes/NagVisMapCfg.php");
--require("./includes/classes/NagVisMap.php");
--require("./includes/classes/NagVisFrontend.php");
--require("./includes/classes/NagVisAutoMap.php");
-+require("/usr/share/nagvis/includes/classes/NagVisMapCfg.php");
-+require("/usr/share/nagvis/includes/classes/NagVisMap.php");
-+require("/usr/share/nagvis/includes/classes/NagVisFrontend.php");
-+require("/usr/share/nagvis/includes/classes/NagVisAutoMap.php");
- // Include needed nagvis object classes
--require("./includes/classes/objects/NagVisObject.php");
--require("./includes/classes/objects/NagVisStatefulObject.php");
--require("./includes/classes/objects/NagVisStatelessObject.php");
--require("./includes/classes/objects/NagiosHost.php");
--require("./includes/classes/objects/NagVisHost.php");
--require("./includes/classes/objects/NagiosService.php");
--require("./includes/classes/objects/NagVisService.php");
--require("./includes/classes/objects/NagiosHostgroup.php");
--require("./includes/classes/objects/NagVisHostgroup.php");
--require("./includes/classes/objects/NagiosServicegroup.php");
--require("./includes/classes/objects/NagVisServicegroup.php");
--require("./includes/classes/objects/NagVisMapObj.php");
--require("./includes/classes/objects/NagVisShape.php");
--require("./includes/classes/objects/NagVisTextbox.php");
-+require("/usr/share/nagvis/includes/classes/objects/NagVisObject.php");
-+require("/usr/share/nagvis/includes/classes/objects/NagVisStatefulObject.php");
-+require("/usr/share/nagvis/includes/classes/objects/NagVisStatelessObject.php");
-+require("/usr/share/nagvis/includes/classes/objects/NagiosHost.php");
-+require("/usr/share/nagvis/includes/classes/objects/NagVisHost.php");
-+require("/usr/share/nagvis/includes/classes/objects/NagiosService.php");
-+require("/usr/share/nagvis/includes/classes/objects/NagVisService.php");
-+require("/usr/share/nagvis/includes/classes/objects/NagiosHostgroup.php");
-+require("/usr/share/nagvis/includes/classes/objects/NagVisHostgroup.php");
-+require("/usr/share/nagvis/includes/classes/objects/NagiosServicegroup.php");
-+require("/usr/share/nagvis/includes/classes/objects/NagVisServicegroup.php");
-+require("/usr/share/nagvis/includes/classes/objects/NagVisMapObj.php");
-+require("/usr/share/nagvis/includes/classes/objects/NagVisShape.php");
-+require("/usr/share/nagvis/includes/classes/objects/NagVisTextbox.php");
- // Load the main configuration
- $MAINCFG = new GlobalMainCfg(CONST_MAINCFG);
-diff -urNad nagvis-1.3.1~/wui/ajax_handler.php nagvis-1.3.1/wui/ajax_handler.php
---- nagvis-1.3.1~/wui/ajax_handler.php 2008-03-29 02:01:07.000000000 +0100
-+++ nagvis-1.3.1/wui/ajax_handler.php  2009-08-23 12:52:15.000000000 +0200
-@@ -29,22 +29,22 @@
- @session_start();
- // Include defines
--require("../nagvis/includes/defines/global.php");
--require("../nagvis/includes/defines/matches.php");
-+require("/usr/share/nagvis/includes/defines/global.php");
-+require("/usr/share/nagvis/includes/defines/matches.php");
- // Include functions
--require("../nagvis/includes/functions/debug.php");
-+require("/usr/share/nagvis/includes/functions/debug.php");
- // Include needed global classes
--require("../nagvis/includes/classes/GlobalMainCfg.php");
--require("../nagvis/includes/classes/GlobalMapCfg.php");
--require("../nagvis/includes/classes/GlobalLanguage.php");
--require("../nagvis/includes/classes/GlobalPage.php");
--require("../nagvis/includes/classes/GlobalBackendMgmt.php");
-+require("/usr/share/nagvis/includes/classes/GlobalMainCfg.php");
-+require("/usr/share/nagvis/includes/classes/GlobalMapCfg.php");
-+require("/usr/share/nagvis/includes/classes/GlobalLanguage.php");
-+require("/usr/share/nagvis/includes/classes/GlobalPage.php");
-+require("/usr/share/nagvis/includes/classes/GlobalBackendMgmt.php");
- // Include needed wui specific classes
--require("./includes/classes/WuiMainCfg.php");
--require("./includes/classes/WuiMapCfg.php");
-+require("/usr/share/nagvis/wui/includes/classes/WuiMainCfg.php");
-+require("/usr/share/nagvis/wui/includes/classes/WuiMapCfg.php");
- // Load the main configuration
- $MAINCFG = new WuiMainCfg(CONST_MAINCFG);
-diff -urNad nagvis-1.3.1~/wui/form_handler.php nagvis-1.3.1/wui/form_handler.php
---- nagvis-1.3.1~/wui/form_handler.php 2008-03-29 02:01:07.000000000 +0100
-+++ nagvis-1.3.1/wui/form_handler.php  2009-08-23 12:52:15.000000000 +0200
-@@ -29,26 +29,26 @@
- @session_start();
- // Include defines
--require('../nagvis/includes/defines/global.php');
--require('../nagvis/includes/defines/matches.php');
-+require('/usr/share/nagvis/includes/defines/global.php');
-+require('/usr/share/nagvis/includes/defines/matches.php');
- // Include global functions
--require('../nagvis/includes/functions/debug.php');
-+require('/usr/share/nagvis/includes/functions/debug.php');
- // Include needed WUI specific functions
--require('./includes/functions/form_handler.php');
-+require('/usr/share/nagvis/htdocs/wui/includes/form_handler.php');
- // Include needed global classes
--require('../nagvis/includes/classes/GlobalLanguage.php');
--require('../nagvis/includes/classes/GlobalMainCfg.php');
--require('../nagvis/includes/classes/GlobalPage.php');
--require('../nagvis/includes/classes/GlobalMapCfg.php');
--require('../nagvis/includes/classes/GlobalBackground.php');
-+require('/usr/share/nagvis/includes/classes/GlobalLanguage.php');
-+require('/usr/share/nagvis/includes/classes/GlobalMainCfg.php');
-+require('/usr/share/nagvis/includes/classes/GlobalPage.php');
-+require('/usr/share/nagvis/includes/classes/GlobalMapCfg.php');
-+require('/usr/share/nagvis/includes/classes/GlobalBackground.php');
- // Include needed WUI specific classes
--require('./includes/classes/WuiMainCfg.php');
--require('./includes/classes/WuiMapCfg.php');
--require('./includes/classes/WuiBackground.php');
-+require('/usr/share/nagvis/wui/includes/classes/WuiMainCfg.php');
-+require('/usr/share/nagvis/wui/includes/classes/WuiMapCfg.php');
-+require('/usr/share/nagvis/wui/includes/classes/WuiBackground.php');
- // Load the main configuration
- $MAINCFG = new WuiMainCfg(CONST_MAINCFG);
-diff -urNad nagvis-1.3.1~/wui/includes/classes/WuiAddModify.php nagvis-1.3.1/wui/includes/classes/WuiAddModify.php
---- nagvis-1.3.1~/wui/includes/classes/WuiAddModify.php        2008-05-23 11:15:21.000000000 +0200
-+++ nagvis-1.3.1/wui/includes/classes/WuiAddModify.php 2009-08-23 12:52:15.000000000 +0200
-@@ -51,10 +51,10 @@
-               $this->LANG = new GlobalLanguage($MAINCFG,'wui:addModify');
-               
-               $prop = Array('title'=>$MAINCFG->getValue('internal', 'title'),
--                                        'cssIncludes'=>Array('./includes/css/wui.css'),
--                                        'jsIncludes'=>Array('../nagvis/includes/js/ajax.js','./includes/js/addmodify.js',
--                                                                                './includes/js/ajax.js',
--                                                                                './includes/js/wui.js'),
-+                                        'cssIncludes'=>Array('./css/wui.css'),
-+                                        'jsIncludes'=>Array('../nagvis/includes/js/ajax.js','./js/addmodify.js',
-+                                                                                './js/ajax.js',
-+                                                                                './js/wui.js'),
-                                         'extHeader'=>Array(''),
-                                         'allowedUsers' => Array('EVERYONE'));
-               parent::GlobalPage($MAINCFG,$prop,'wui:addModify');
-diff -urNad nagvis-1.3.1~/wui/includes/classes/WuiBackendManagement.php nagvis-1.3.1/wui/includes/classes/WuiBackendManagement.php
---- nagvis-1.3.1~/wui/includes/classes/WuiBackendManagement.php        2008-05-01 19:18:59.000000000 +0200
-+++ nagvis-1.3.1/wui/includes/classes/WuiBackendManagement.php 2009-08-23 12:52:15.000000000 +0200
-@@ -48,10 +48,10 @@
-               $this->LANG = new GlobalLanguage($MAINCFG,'wui:backendManagement');
-               
-               $prop = Array('title'=>$MAINCFG->getValue('internal', 'title'),
--                                        'cssIncludes'=>Array('./includes/css/wui.css'),
--                                        'jsIncludes'=>Array('../nagvis/includes/js/ajax.js','./includes/js/wui.js',
--                                                                                      './includes/js/BackendManagement.js',
--                                                                                      './includes/js/ajax.js'),
-+                                        'cssIncludes'=>Array('./css/wui.css'),
-+                                        'jsIncludes'=>Array('../nagvis/includes/js/ajax.js','./js/wui.js',
-+                                                                                      './js/BackendManagement.js',
-+                                                                                      './js/ajax.js'),
-                                         'extHeader'=>Array(''),
-                                         'allowedUsers' => $this->MAINCFG->getValue('wui','allowedforconfig'),
-                                         'languageRoot' => 'wui:backendManagement');
-diff -urNad nagvis-1.3.1~/wui/includes/classes/WuiBackgroundManagement.php nagvis-1.3.1/wui/includes/classes/WuiBackgroundManagement.php
---- nagvis-1.3.1~/wui/includes/classes/WuiBackgroundManagement.php     2008-05-01 19:18:59.000000000 +0200
-+++ nagvis-1.3.1/wui/includes/classes/WuiBackgroundManagement.php      2009-08-23 12:52:15.000000000 +0200
-@@ -46,10 +46,10 @@
-               $this->LANG = new GlobalLanguage($MAINCFG,'wui:backgroundManagement');
-               
-               $prop = Array('title'=>$MAINCFG->getValue('internal', 'title'),
--                                        'cssIncludes'=>Array('./includes/css/wui.css'),
--                                        'jsIncludes'=>Array('../nagvis/includes/js/ajax.js','./includes/js/BackgroundManagement.js',
--                                                                                      './includes/js/ajax.js',
--                                                                                      './includes/js/wui.js'),
-+                                        'cssIncludes'=>Array('./css/wui.css'),
-+                                        'jsIncludes'=>Array('../nagvis/includes/js/ajax.js','./js/BackgroundManagement.js',
-+                                                                                      './js/ajax.js',
-+                                                                                      './js/wui.js'),
-                                         'extHeader'=>Array(''),
-                                         'allowedUsers' => $this->MAINCFG->getValue('wui','allowedforconfig'),
-                                         'languageRoot' => 'wui:backgroundManagement');
-diff -urNad nagvis-1.3.1~/wui/includes/classes/WuiEditMainCfg.php nagvis-1.3.1/wui/includes/classes/WuiEditMainCfg.php
---- nagvis-1.3.1~/wui/includes/classes/WuiEditMainCfg.php      2008-05-01 21:33:17.000000000 +0200
-+++ nagvis-1.3.1/wui/includes/classes/WuiEditMainCfg.php       2009-08-23 12:52:15.000000000 +0200
-@@ -43,8 +43,8 @@
-               $this->LANG = new GlobalLanguage($MAINCFG,'wui:editMainCfg');
-               
-               $prop = Array('title'=>$MAINCFG->getValue('internal', 'title'),
--                                        'cssIncludes'=>Array('./includes/css/wui.css'),
--                                        'jsIncludes'=>Array('./includes/js/wui.js','./includes/js/EditMainCfg.js'),
-+                                        'cssIncludes'=>Array('./css/wui.css'),
-+                                        'jsIncludes'=>Array('./js/wui.js','./js/EditMainCfg.js'),
-                                         'extHeader'=>Array(''),
-                                         'allowedUsers' => $this->MAINCFG->getValue('wui','allowedforconfig'),
-                                         'languageRoot' => 'wui:editMainCfg');
-diff -urNad nagvis-1.3.1~/wui/includes/classes/WuiFrontend.php nagvis-1.3.1/wui/includes/classes/WuiFrontend.php
---- nagvis-1.3.1~/wui/includes/classes/WuiFrontend.php 2008-05-18 22:53:20.000000000 +0200
-+++ nagvis-1.3.1/wui/includes/classes/WuiFrontend.php  2009-08-23 12:52:15.000000000 +0200
-@@ -44,13 +44,13 @@
-               $this->LANG = new GlobalLanguage($this->MAINCFG,'wui:global');
-               
-               $prop = Array('title'=>$MAINCFG->getValue('internal', 'title'),
--                                        'cssIncludes'=>Array('../nagvis/includes/css/style.css','./includes/css/wui.css','./includes/css/office_xp/office_xp.css'),
--                                        'jsIncludes'=>Array('../nagvis/includes/js/ajax.js','./includes/js/wui.js',
--                                                './includes/js/ajax.js',
--                                                './includes/js/jsdomenu.js',
--                                                './includes/js/jsdomenu.inc.js',
--                                                './includes/js/wz_jsgraphics.js',
--                                                './includes/js/wz_dragdrop.js'),
-+                                        'cssIncludes'=>Array('../nagvis/includes/css/style.css','./css/wui.css','./css/office_xp/office_xp.css'),
-+                                        'jsIncludes'=>Array('../nagvis/includes/js/ajax.js','./js/wui.js',
-+                                                './js/ajax.js',
-+                                                './js/jsdomenu.js',
-+                                                './js/jsdomenu.inc.js',
-+                                                './js/wz_jsgraphics.js',
-+                                                './js/wz_dragdrop.js'),
-                                         'extHeader'=>Array("<style type=\"text/css\">body.main { background-color: ".$this->MAPCFG->getValue('global',0, 'background_color')."; }</style>"),
-                                         'allowedUsers' => $this->MAPCFG->getValue('global', 0,'allowed_for_config'),
-                                         'languageRoot' => 'wui:global');
-diff -urNad nagvis-1.3.1~/wui/includes/classes/WuiMap.php nagvis-1.3.1/wui/includes/classes/WuiMap.php
---- nagvis-1.3.1~/wui/includes/classes/WuiMap.php      2008-05-01 22:33:58.000000000 +0200
-+++ nagvis-1.3.1/wui/includes/classes/WuiMap.php       2009-08-23 12:52:15.000000000 +0200
-@@ -144,7 +144,7 @@
-               $ret = array_merge($ret,$this->parseObjects());
-               $ret = array_merge($ret,$this->parseInvisible());
-               $ret = array_merge($ret,$this->makeObjectsMoveable());
--              $ret = array_merge($ret,Array("<script type=\"text/javascript\" src=\"./includes/js/wz_tooltip.js\"></script>"));
-+              $ret = array_merge($ret,Array("<script type=\"text/javascript\" src=\"./js/wz_tooltip.js\"></script>"));
-               
-               return $ret;
-       }
-diff -urNad nagvis-1.3.1~/wui/includes/classes/WuiMapManagement.php nagvis-1.3.1/wui/includes/classes/WuiMapManagement.php
---- nagvis-1.3.1~/wui/includes/classes/WuiMapManagement.php    2008-05-01 19:18:59.000000000 +0200
-+++ nagvis-1.3.1/wui/includes/classes/WuiMapManagement.php     2009-08-23 12:52:15.000000000 +0200
-@@ -49,10 +49,10 @@
-               $this->LANG = new GlobalLanguage($MAINCFG,'wui:mapManagement');
-               
-               $prop = Array('title'=>$MAINCFG->getValue('internal', 'title'),
--                                        'cssIncludes'=>Array('./includes/css/wui.css'),
--                                        'jsIncludes'=>Array('../nagvis/includes/js/ajax.js','./includes/js/map_management.js',
--                                                                                      './includes/js/ajax.js',
--                                                                                      './includes/js/wui.js'),
-+                                        'cssIncludes'=>Array('./css/wui.css'),
-+                                        'jsIncludes'=>Array('../nagvis/includes/js/ajax.js','./js/map_management.js',
-+                                                                                      './js/ajax.js',
-+                                                                                      './js/wui.js'),
-                                         'extHeader'=>Array(''),
-                                         'allowedUsers' => $this->MAINCFG->getValue('wui','allowedforconfig'),
-                                         'languageRoot' => 'wui:mapManagement');
-diff -urNad nagvis-1.3.1~/wui/includes/classes/WuiShapeManagement.php nagvis-1.3.1/wui/includes/classes/WuiShapeManagement.php
---- nagvis-1.3.1~/wui/includes/classes/WuiShapeManagement.php  2008-05-01 19:18:59.000000000 +0200
-+++ nagvis-1.3.1/wui/includes/classes/WuiShapeManagement.php   2009-08-23 12:52:15.000000000 +0200
-@@ -47,10 +47,10 @@
-         $this->LANG = new GlobalLanguage($MAINCFG,'wui:shapeManagement');
-         
-         $prop = Array('title'=>$MAINCFG->getValue('internal', 'title'),
--                    'cssIncludes'=>Array('./includes/css/wui.css'),
--                    'jsIncludes'=>Array('../nagvis/includes/js/ajax.js','./includes/js/ShapeManagement.js',
--                        './includes/js/ajax.js',
--                        './includes/js/wui.js'),
-+                    'cssIncludes'=>Array('./css/wui.css'),
-+                    'jsIncludes'=>Array('../nagvis/includes/js/ajax.js','./js/ShapeManagement.js',
-+                        './js/ajax.js',
-+                        './js/wui.js'),
-                     'extHeader'=>Array(''),
-                     'allowedUsers' => $this->MAINCFG->getValue('wui','allowedforconfig'),
-                     'languageRoot' => 'wui:shapeManagement');
-diff -urNad nagvis-1.3.1~/wui/index.php nagvis-1.3.1/wui/index.php
---- nagvis-1.3.1~/wui/index.php        2008-06-06 13:19:25.000000000 +0200
-+++ nagvis-1.3.1/wui/index.php 2009-08-23 12:52:15.000000000 +0200
-@@ -29,25 +29,25 @@
- @session_start();
- // Include defines
--require("../nagvis/includes/defines/global.php");
--require("../nagvis/includes/defines/matches.php");
-+require("/usr/share/nagvis/includes/defines/global.php");
-+require("/usr/share/nagvis/includes/defines/matches.php");
- // Include functions
--require("../nagvis/includes/functions/debug.php");
--require("../nagvis/includes/functions/oldPhpVersionFixes.php");
-+require("/usr/share/nagvis/includes/functions/debug.php");
-+require("/usr/share/nagvis/includes/functions/oldPhpVersionFixes.php");
- // Include needed global classes
--require("../nagvis/includes/classes/GlobalMainCfg.php");
--require("../nagvis/includes/classes/GlobalMapCfg.php");
--require("../nagvis/includes/classes/GlobalLanguage.php");
--require("../nagvis/includes/classes/GlobalPage.php");
--require("../nagvis/includes/classes/GlobalMap.php");
--require("../nagvis/includes/classes/GlobalBackground.php");
--require("../nagvis/includes/classes/GlobalGraphic.php");
-+require("/usr/share/nagvis/includes/classes/GlobalMainCfg.php");
-+require("/usr/share/nagvis/includes/classes/GlobalMapCfg.php");
-+require("/usr/share/nagvis/includes/classes/GlobalLanguage.php");
-+require("/usr/share/nagvis/includes/classes/GlobalPage.php");
-+require("/usr/share/nagvis/includes/classes/GlobalMap.php");
-+require("/usr/share/nagvis/includes/classes/GlobalBackground.php");
-+require("/usr/share/nagvis/includes/classes/GlobalGraphic.php");
- // Include needed wui specific classes
--require("./includes/classes/WuiMainCfg.php");
--require("./includes/classes/WuiMapCfg.php");
-+require("/usr/share/nagvis/wui/includes/classes/WuiMainCfg.php");
-+require("/usr/share/nagvis/wui/includes/classes/WuiMapCfg.php");
- // Load the main configuration
- $MAINCFG = new WuiMainCfg(CONST_MAINCFG);
-@@ -61,8 +61,8 @@
- switch($_GET['page']) {
-       case 'edit_config':
-               // Include page specific global/wui classes
--              require("../nagvis/includes/classes/GlobalForm.php");
--              require("./includes/classes/WuiEditMainCfg.php");
-+              require("/usr/share/nagvis/includes/classes/GlobalForm.php");
-+              require("/usr/share/nagvis/wui/includes/classes/WuiEditMainCfg.php");
-               
-               $FRONTEND = new WuiEditMainCfg($MAINCFG);
-               $FRONTEND->getForm();
-@@ -70,40 +70,40 @@
-       break;
-       case 'shape_management':
-               // Include page specific global/wui classes
--              require("../nagvis/includes/classes/GlobalForm.php");
--              require("./includes/classes/WuiShapeManagement.php");
-+              require("/usr/share/nagvis/includes/classes/GlobalForm.php");
-+              require("/usr/share/nagvis/wui/includes/classes/WuiShapeManagement.php");
-               
-               $FRONTEND = new WuiShapeManagement($MAINCFG);
-               $FRONTEND->getForm();
-       break;
-       case 'background_management':
-               // Include page specific global/wui classes
--              require("../nagvis/includes/classes/GlobalForm.php");
--              require("./includes/classes/WuiBackgroundManagement.php");
-+              require("/usr/share/nagvis/includes/classes/GlobalForm.php");
-+              require("/usr/share/nagvis/wui/includes/classes/WuiBackgroundManagement.php");
-               
-               $FRONTEND = new WuiBackgroundManagement($MAINCFG);
-               $FRONTEND->getForm();
-       break;
-       case 'map_management':
-               // Include page specific global/wui classes
--              require("../nagvis/includes/classes/GlobalForm.php");
--              require("./includes/classes/WuiMapManagement.php");
-+              require("/usr/share/nagvis/includes/classes/GlobalForm.php");
-+              require("/usr/share/nagvis/wui/includes/classes/WuiMapManagement.php");
-               
-               $FRONTEND = new WuiMapManagement($MAINCFG);
-               $FRONTEND->getForm();
-       break;
-       case 'backend_management':
-               // Include page specific global/wui classes
--              require("../nagvis/includes/classes/GlobalForm.php");
--              require("./includes/classes/WuiBackendManagement.php");
-+              require("/usr/share/nagvis/includes/classes/GlobalForm.php");
-+              require("/usr/share/nagvis/wui/includes/classes/WuiBackendManagement.php");
-               
-               $FRONTEND = new WuiBackendManagement($MAINCFG);
-               $FRONTEND->getForm();
-       break;
-       case 'addmodify':
-               // Include page specific global/wui classes
--              require("../nagvis/includes/classes/GlobalForm.php");
--              require("./includes/classes/WuiAddModify.php");
-+              require("/usr/share/nagvis/includes/classes/GlobalForm.php");
-+              require("/usr/share/nagvis/wui/includes/classes/WuiAddModify.php");
-               
-               $MAPCFG = new WuiMapCfg($MAINCFG,$_GET['map']);
-               $MAPCFG->readMapConfig();
-@@ -125,8 +125,8 @@
-               // Default is the wui map
-               
-               // Include page specific global/wui classes
--              require("./includes/classes/WuiFrontend.php");
--              require("./includes/classes/WuiMap.php");
-+              require("/usr/share/nagvis/wui/includes/classes/WuiFrontend.php");
-+              require("/usr/share/nagvis/wui/includes/classes/WuiMap.php");
-               
-               // Set empty map if none is set
-               if(!isset($_GET['map'])) {
index d5ff52d14606ac8a730fdd7f3e2506315c8ecc3b..925277a44fd87351bea7fb709317e9a509fa0fae 100644 (file)
@@ -47,8 +47,11 @@ case "$1" in
                test -f $f && setperm www-data www-data 0644 $f
                test -d $f && setperm www-data www-data 0755 $f
        done
-       setperm www-data www-data 0775 /usr/share/nagvis/htdocs/nagvis/etc/maps
+       setperm www-data www-data 0775 /etc/nagvis/maps
        setperm www-data www-data 0755 /var/lib/nagvis
+       setperm www-data www-data 0755 /var/lib/nagvis/images
+       setperm www-data www-data 0755 /var/lib/nagvis/images/maps
+       setperm www-data www-data 0755 /var/cache/nagvis
 
        ucf --debconf-ok /usr/share/nagvis/debian/apache.conf /etc/nagvis/apache.conf
        #if [ ! -f /etc/apache2/conf.d/nagvis.conf ]; then
index 3485a986fcb53f5cc664bd5e13da1ba3300c4caf..fa212e61ff71822e726e43b0a5cde2fa77dc7a35 100644 (file)
@@ -47,6 +47,9 @@ if [ "$1" = "purge" ]; then
        #if [ -e /etc/apache2/conf.d/nagvis.conf ]; then
        #       rm -f /etc/apache2/conf.d/nagvis.conf
        #fi
+
+       rm -f /var/cache/nagvis/*
+        rmdir /var/cache/nagvis
 fi
        
 # dh_installdeb will replace this with shell code automatically
index 0291ca41b028627b33a688592298f5bf18b10e3f..16b81240b7e26fecd51903e006fd9db8440d9633 100755 (executable)
@@ -35,10 +35,13 @@ install: build
        install -d $(DEST)/etc/nagvis \
                        $(DEST)/usr/share/nagvis/debian/ \
                        $(DEST)/usr/share/nagvis/htdocs/nagvis/ \
-                       $(DEST)/usr/share/nagvis/htdocs/wui/ \
-                       $(DEST)/usr/share/nagvis/includes\
-                       $(DEST)/usr/share/nagvis/wui/includes
+                       $(DEST)/usr/share/nagvis/htdocs/wui/
+
+       install -d $(DEST)/var/lib/nagvis/images/maps
+       install -d $(DEST)/var/cache/nagvis
        
+       [ -x /usr/bin/html2text ] && \
+                /usr/bin/html2text -ascii -nobs < docs/en_US/changelog.html > docs/Changelog
        cp -a etc/* $(DEST)/etc/nagvis
        mv $(DEST)/etc/nagvis/nagvis.ini.php-sample \
                $(DEST)/usr/share/nagvis/debian/
@@ -52,41 +55,30 @@ install: build
         mv $(DEST)/usr/share/nagvis/debian/nagvis.ini.php-sample.new \
            $(DEST)/usr/share/nagvis/debian/nagvis.ini.php-sample
        
-       for dir in classes defines functions; do \
-               cp -a nagvis/includes/$$dir $(DEST)/usr/share/nagvis/includes/; \
-       done
-       
-       cp -a nagvis/images $(DEST)/usr/share/nagvis/htdocs/nagvis/
-       chmod -x $(DEST)/usr/share/nagvis/htdocs/nagvis/images/*/*
-       install -d $(DEST)/usr/share/nagvis/htdocs/nagvis/includes/
-       cp -a nagvis/includes/css $(DEST)/usr/share/nagvis/htdocs/nagvis/includes/
-       cp -a nagvis/includes/js $(DEST)/usr/share/nagvis/htdocs/nagvis/includes/
-       cp -a nagvis/includes/languages $(DEST)/usr/share/nagvis/htdocs/nagvis/includes/
+       cp -a nagvis/* $(DEST)/usr/share/nagvis/htdocs/nagvis/.
+       #--# install -d $(DEST)/usr/share/nagvis/htdocs/nagvis/includes/.
+       #--# cp -a nagvis/includes/* $(DEST)/usr/share/nagvis/htdocs/nagvis/includes/.
+       #--# cp -a nagvis/*.php $(DEST)/usr/share/nagvis/htdocs/nagvis/.
        
-       cp -a nagvis/*.php $(DEST)/usr/share/nagvis/htdocs/nagvis/
-       
-       cp -a wui/images $(DEST)/usr/share/nagvis/htdocs/wui/
-       cp -a wui/includes/classes $(DEST)/usr/share/nagvis/wui/includes/
-       cp -a wui/includes/css $(DEST)/usr/share/nagvis/htdocs/wui/
-       cp -a wui/includes/js $(DEST)/usr/share/nagvis/htdocs/wui/
-       cp -a wui/includes/functions $(DEST)/usr/share/nagvis/htdocs/wui/includes/
-       cp -a wui/*.php $(DEST)/usr/share/nagvis/htdocs/wui/
-       cp -a *.php $(DEST)/usr/share/nagvis/htdocs/
+       cp -a wui/* $(DEST)/usr/share/nagvis/htdocs/wui/.
+
+       cp -a index.php $(DEST)/usr/share/nagvis/htdocs/.
        
-       install -d $(DEST)/etc/nagvis/templates/
-       cp -a nagvis/templates/* $(DEST)/etc/nagvis/templates/
+       #--# install -d $(DEST)/etc/nagvis/templates/
+       #--# cp -a nagvis/templates/* $(DEST)/etc/nagvis/templates/
        
        # demo site
        install -d $(DEST)/demo/nagvis/images/maps $(DEST)/demo/etc/nagvis/maps
        mv $(DEST)/etc/nagvis/maps/demo*.cfg $(DEST)/demo/etc/nagvis/maps/
        mv $(DEST)/usr/share/nagvis/htdocs/nagvis/images/maps/nagvis-demo.png \
                $(DEST)/demo/nagvis/images/maps/
-       rm -rf $(DEST)/usr/share/nagvis/htdocs/nagvis/images/templates
+       #--# rm -rf $(DEST)/usr/share/nagvis/htdocs/nagvis/images/templates
        rm -rf $(DEST)/usr/share/nagvis/htdocs/nagvis/images/maps
        
        # config templates
        install -m 755 -d $(DEST)/usr/share/nagvis/debian
        install -m 644 debian/apache.conf $(DEST)/usr/share/nagvis/debian/
+       install -m 644 debian/apache.conf $(DEST)/etc/nagvis/
        
        # lintian overrides
        install -m 755 -d $(DEST)/usr/share/lintian/overrides