Package: ocsinventory-server
Version: 1.02-3
Severity: wishlist
Hello,
I create a new branch dad/generate-ocs-files-in-lib:
* debian/ocsinventory-server.dirs: Create
/var/lib/ocsinventory-server/inventories.
* debian/ocsinventory-server.postinst: www-data must write to
/var/lib/ocsinventory-server/inventories.
* debian/conf/ocsinventory.conf: Fix OCS_OPT_OCS_FILES_PATH.
* debian/db/mysql: Fix OCS_FILES_PATH.
* debian/db/1.02: Ditto.
---
debian/conf/ocsinventory.conf | 2 +-
debian/db/1.02 | 2 +-
debian/db/mysql | 2 +-
debian/ocsinventory-server.dirs | 2 ++
debian/ocsinventory-server.postinst | 3 ++-
5 files changed, 7 insertions(+), 4 deletions(-)
Regards
-- System Information:
Debian Release: squeeze/sid
APT prefers unstable
APT policy: (500, 'unstable'), (90, 'experimental')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.30-rc6+hati.1 (SMP w/2 CPU cores; PREEMPT)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
diff --git a/debian/conf/ocsinventory.conf b/debian/conf/ocsinventory.conf
index dc113be..94d501f 100644
--- a/debian/conf/ocsinventory.conf
+++ b/debian/conf/ocsinventory.conf
@@ -168,7 +168,7 @@
# Specify if you want to keep trace of all inventory between to synchronisation with the higher level server
PerlSetEnv OCS_OPT_OCS_FILES_OVERWRITE 0
# Path to ocs files directory (must be writeable)
- PerlSetEnv OCS_OPT_OCS_FILES_PATH /tmp
+ PerlSetEnv OCS_OPT_OCS_FILES_PATH /var/lib/ocsinventory-server/inventories
# ===== FILTER SETTINGS =====
diff --git a/debian/db/1.02 b/debian/db/1.02
index 3c798ff..1fab881 100644
--- a/debian/db/1.02
+++ b/debian/db/1.02
@@ -252,7 +252,7 @@ INSERT INTO `config` (`NAME`, `IVALUE`, `TVALUE`, `COMMENTS`) VALUES
('LOCK_REUSE_TIME', 600, '', 'Validity of a computer''s lock'),
('OCS_FILES_FORMAT', 0, 'OCS', 'Generate either compressed file or clear XML text'),
('OCS_FILES_OVERWRITE', 0, '', 'Specify if you want to keep trace of all inventory between to synchronisation with the higher level server'),
- ('OCS_FILES_PATH', 0, '/tmp', 'Path to ocs files directory (must be writeable)'),
+ ('OCS_FILES_PATH', 0, '/var/lib/ocsinventory-server/inventories', 'Path to ocs files directory (must be writeable)'),
('PROLOG_FILTER_ON', 0, '', 'Enable prolog filter stack'),
('SESSION_VALIDITY_TIME', 1, '', 'Validity of a session');
diff --git a/debian/db/mysql b/debian/db/mysql
index 582e778..2eb4401 100644
--- a/debian/db/mysql
+++ b/debian/db/mysql
@@ -592,7 +592,7 @@ INSERT INTO `config` (`NAME`, `IVALUE`, `TVALUE`, `COMMENTS`) VALUES
('LOGLEVEL', 0, '', 'ocs engine loglevel'),
('OCS_FILES_FORMAT', 0, 'OCS', 'Generate either compressed file or clear XML text'),
('OCS_FILES_OVERWRITE', 0, '', 'Specify if you want to keep trace of all inventory between to synchronisation with the higher level server'),
- ('OCS_FILES_PATH', 0, '/tmp', 'Path to ocs files directory (must be writeable)'),
+ ('OCS_FILES_PATH', 0, '/var/lib/ocsinventory-server/inventories', 'Path to ocs files directory (must be writeable)'),
('PROLOG_FILTER_ON', 0, '', 'Enable prolog filter stack'),
('PROLOG_FREQ', 24, '', 'Specify the frequency (hours) of prolog, on agents'),
('REGISTRY', 0, '', 'Activates or not the registry query function'),
diff --git a/debian/ocsinventory-server.dirs b/debian/ocsinventory-server.dirs
index 306aa81..b28fdf6 100644
--- a/debian/ocsinventory-server.dirs
+++ b/debian/ocsinventory-server.dirs
@@ -2,3 +2,5 @@ etc/ocsinventory
usr/share/ocsinventory-server/files
usr/share/doc/ocsinventory-server
var/log/ocsinventory-server
+var/lib/ocsinventory-server
+var/lib/ocsinventory-server/inventories
diff --git a/debian/ocsinventory-server.postinst b/debian/ocsinventory-server.postinst
index 9712151..673ac6a 100644
--- a/debian/ocsinventory-server.postinst
+++ b/debian/ocsinventory-server.postinst
@@ -16,11 +16,12 @@ if [ "$1" = "configure" ]; then
# only on a new install
if [ "$2" = "" ] || [ ! -f /etc/ocsinventory/ocsinventory.conf ]; then
pkgpath="/usr/share/ocsinventory-server"
+ varpath="/var/lib/ocsinventory-server"
confpath="/etc/ocsinventory"
conffile="ocsinventory.conf"
# Allow mod_perl to write there
- for dirname in /var/log/ocsinventory-server; do
+ for dirname in /var/log/ocsinventory-server $varpath/inventories; do
chown www-data:www-data $dirname
chmod g+w $dirname
done
--