File: refresh-install-files

package info (click to toggle)
fusioninventory-agent 1%3A2.6-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 27,488 kB
  • sloc: perl: 120,896; xml: 9,459; sh: 760; python: 26; makefile: 13
file content (51 lines) | stat: -rw-r--r-- 2,181 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#!/usr/bin/perl

use strict;
use warnings;

use File::Find;

open AGENT, ">debian/fusioninventory-agent.install";
open AGENT_TASK_DEPLOY, ">debian/fusioninventory-agent-task-deploy.install";
open AGENT_TASK_NETWORK, ">debian/fusioninventory-agent-task-network.install";
open AGENT_TASK_ESX, ">debian/fusioninventory-agent-task-esx.install";
open AGENT_TASK_COLLECT, ">debian/fusioninventory-agent-task-collect.install";

find({ wanted => \&wanted, no_chdir=>1}, 'blib');
sub wanted {
    my $t = $File::Find::name;
    return unless -f $t;
    $t =~ s,blib/,usr/share/fusioninventory/,;
    $t =~ s,usr/share/fusioninventory/script/,usr/bin/,;
    if (/\/man1\//) {
        # dh_installmans
    } elsif ($t =~ /fusioninventory-net/ || $t =~ /FusionInventory\/Agent\/SNMP/) {
        print AGENT_TASK_NETWORK "$t\n";
    } elsif ($t =~ /FusionInventory\/Agent\/Tools\/Hardware/) {
        print AGENT_TASK_NETWORK "$t\n";
    } elsif ($t =~ /FusionInventory\/Agent\/Task\/Net/) {
        print AGENT_TASK_NETWORK "$t\n";
    } elsif ($t =~ /fusioninventory-esx/) {
        print AGENT_TASK_ESX "$t\n";
    } elsif ($t =~ /FusionInventory\/Agent\/Task\/ESX/) {
        print AGENT_TASK_ESX "$t\n";
    } elsif ($t =~ /FusionInventory\/Agent\/Task\/Deploy/) {
        print AGENT_TASK_DEPLOY "$t\n";
    } elsif ($t =~ /FusionInventory\/Agent\/Task\/Collect/) {
        print AGENT_TASK_COLLECT "$t\n";
    } elsif ($t !~ m,/.exists,) {
        # Skip .exists files
        print AGENT "$t\n";
    }
};

print AGENT "etc/agent.cfg /usr/share/fusioninventory/etc\n";
print AGENT "etc/inventory-server-plugin.cfg /usr/share/fusioninventory/etc\n";
print AGENT "etc/ssl-server-plugin.cfg /usr/share/fusioninventory/etc\n";
print AGENT "etc/server-test-plugin.cfg /usr/share/fusioninventory/etc\n";
print AGENT "etc/proxy-server-plugin.cfg /usr/share/fusioninventory/etc\n";
print AGENT "etc/proxy2-server-plugin.cfg /usr/share/fusioninventory/etc\n";
print AGENT "usr/share/fusioninventory/edid.ids\n";
print AGENT "usr/share/fusioninventory/sysobject.ids\n";
print AGENT "usr/share/fusioninventory/html\n";
print AGENT "contrib/unix/fusioninventory-agent.service lib/systemd/system\n";