premier commit
This commit is contained in:
commit
dfd5c54258
|
@ -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 @@
|
||||||
|
62354
|
|
@ -0,0 +1 @@
|
||||||
|
private
|
|
@ -0,0 +1 @@
|
||||||
|
service
|
|
@ -0,0 +1,3 @@
|
||||||
|
PERMS=0660
|
||||||
|
UID="root"
|
||||||
|
GID="root"
|
|
@ -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…
Reference in New Issue