premier commit

tags/0.2.0
Daniel Berteaud 13 years ago
commit dfd5c54258
  1. 13
      createlinks
  2. 1
      root/etc/e-smith/db/configuration/defaults/fusioninventory-agent/TCPPort
  3. 1
      root/etc/e-smith/db/configuration/defaults/fusioninventory-agent/access
  4. 1
      root/etc/e-smith/db/configuration/defaults/fusioninventory-agent/type
  5. 3
      root/etc/e-smith/templates.metadata/etc/fusioninventory/agent.cfg
  6. 2
      root/etc/e-smith/templates/etc/fusioninventory/agent.cfg/10dir
  7. 1
      root/etc/e-smith/templates/etc/fusioninventory/agent.cfg/15server
  8. 14
      root/etc/e-smith/templates/etc/fusioninventory/agent.cfg/20auth
  9. 9
      root/etc/e-smith/templates/etc/fusioninventory/agent.cfg/25rpc
  10. 1
      root/etc/e-smith/templates/etc/fusioninventory/agent.cfg/30tag
  11. 10
      root/etc/e-smith/templates/etc/fusioninventory/agent.cfg/35deploy
  12. 27
      root/var/service/fusioninventory-agent/log/run
  13. 27
      root/var/service/fusioninventory-agent/run
  14. 60
      smeserver-fusioninventory-agent.spec

@ -0,0 +1,13 @@
#!/usr/bin/perl -w
use esmith::Build::CreateLinks qw(:all);
service_link_enhanced("fusioninventory-agent", "S88", "7");
service_link_enhanced("fusioninventory-agent", "K12", "6");
service_link_enhanced("fusioninventory-agent", "K12", "0");
service_link_enhanced("fusioninventory-agent", "K12", "1");
safe_touch("root/var/service/fusioninventory-agent/down");
safe_symlink("../daemontools" , 'root/etc/rc.d/init.d/supervise/fusioninventory-agent');
safe_symlink("/var/service/fusioninventory-agent" , 'root/service/fusioninventory-agent');

@ -0,0 +1,2 @@
share-dir=/usr/lib/perl5/vendor_perl/5.8.8/auto/share/dist/FusionInventory-Agent
basevardir=/var/lib/fusioninventory-agent

@ -0,0 +1 @@
server={${'fusioninventory-agent'}{'Server'}}

@ -0,0 +1,14 @@
{
my $user = ${'fusioninventory-agent'}{'User'} || '';
my $pass = ${'fusioninventory-agent'}{'Password'} || '';
if ($user ne '' and $pass ne ''){
$OUT .=<<"EOF";
user=$user
password=$pass
EOF
}
else{
$OUT .= '# No authentication configured';
}
}

@ -0,0 +1,9 @@
rpc-trust-localhost
rpc-port={${'fusioninventory-agent'}{'TCPPort'} || '62354'}
{
my $network = ${'fusioninventory-agent'}{'Networking'} || 'no';
my $listen = ($network) ? '127.0.0.1':'0.0.0.0';
$OUT .= "rpc-ip=$listen\n";
}

@ -0,0 +1 @@
tag={${'fusioninventory-agent'}{'Tag'} || $DomainName}

@ -0,0 +1,10 @@
{
my $deploy = ${'fusioninventory-agent'}{'Deploy'} || 'disabled';
return '' if ($deploy eq 'enabled');
$OUT .=<<'HERE';
no-deploy
no-ocsdeploy
HERE
}

@ -0,0 +1,27 @@
#!/bin/sh
#----------------------------------------------------------------------
# copyright (C) 2011 Firewall Services
# daniel@firewall-services.com
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
#----------------------------------------------------------------------
exec \
/usr/local/bin/setuidgid smelog \
/usr/local/bin/multilog t s5000000 \
/var/log/inventory

@ -0,0 +1,27 @@
#!/bin/sh
#----------------------------------------------------------------------
# copyright (C) 2011 Firewall Services
# daniel@firewall-services.com
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
#----------------------------------------------------------------------
OPTIONS=$(/sbin/e-smith/db configuration getprop fusioninventory-agent getprop Options || echo '')
exec 2>&1
exec /usr/bin/fusioninventory-agent --daemon-no-fork \
--info $OPTIONS

@ -0,0 +1,60 @@
%define version 0.1
%define release 2
%define name smeserver-fusioninventory-agent
Summary: FusionInventory-Agent integration on SME Server
Name: %{name}
Version: %{version}
Release: %{release}%{?dist}
License: GPL
Group: Networking/Daemons
Source: %{name}-%{version}.tar.gz
Patch0: smeserver-fusioninventory-agent-0.1-disable_deploy.patch
BuildRoot: /var/tmp/%{name}-%{version}-%{release}-buildroot
BuildArchitectures: noarch
BuildRequires: e-smith-devtools
Requires: e-smith-base >= 5.2.0
Requires: fusioninventory-agent
%description
Configure FusdionInventory daemon on SME Server
%changelog
* Mon Dec 19 2011 Daniel Berteaud <daniel@firewall-services.com> - 0.2.sme
- disable deploy and ocsdeply in the default config
* Tue Nov 29 2011 Daniel Berteaud <daniel@firewall-services.com> - 0.1.sme
- initial release
%prep
%setup -q -n %{name}-%{version}
%patch0 -p1
%build
%{__mkdir_p} root/var/log/inventory
perl createlinks
%install
/bin/rm -rf $RPM_BUILD_ROOT
(cd root ; /usr/bin/find . -depth -print | /bin/cpio -dump $RPM_BUILD_ROOT)
/bin/rm -f %{name}-%{version}-filelist
/sbin/e-smith/genfilelist $RPM_BUILD_ROOT \
--file /var/service/fusioninventory-agent/run 'attr(0755,root,root)' \
--file /var/service/fusioninventory-agent/log/run 'attr(0755,root,root)' \
--dir /var/log/inventory 'attr(0750,smelog,smelog)' \
> %{name}-%{version}-filelist
%files -f %{name}-%{version}-filelist
%defattr(-,root,root)
%clean
rm -rf $RPM_BUILD_ROOT
%post
%preun
Loading…
Cancel
Save