Project

General

Profile

eqosd.pl.patch

Laurent Flori, 11/29/2016 01:58 PM

Download (1.36 KB)

View differences:

eqosd.pl.new 2016-11-29 13:11:08.450855013 +0100
72 72
##################################################################
73 73
my $apprevision = '$Revision: 1.8.0 $';
74
my $mac = '';
74
my $mac = 'ens4';
75
my $root_dir = "/usr/share/eqos/";
76
my $sqlite_dir = "/var/lib/sqlite/eqos/";
75 77
my $halt = 0; # halt flag (stop service)
76 78
my $sleeptime = 5; # time wait between each iteration of main loop
77 79
my $proxyserver = ""; # http proxy used by SOAP
......
98 100
my $pid_checker = -1;
99
my $exec_checker = "./checker.pl"; # checker exe file
101
my $exec_checker = $root_dir."checker.pl"; # checker exe file
100 102
my $kill_checker = 15; # loop waited before killing checker
101 103
my $pid_feedback = -1;
102 104
my $kill_feedback = 15; # loop waited before killing feedback
103 105
# SQLite
104
my $sqlite_datafile = "/var/lib/sqlite/eqos/eqosd.sqlite";
105
my $sqlite_structdumpfile = "sql/eqos_struct.sql";
106
my $sqlite_datafile = $sqlite_dir."eqosd.sqlite";
107
my $sqlite_structdumpfile = $root_dir."sql/eqos_struct.sql";
106 108
my $feedback_max = 50; # max block sent to each SOAP packet
......
206 208
# Return eth0 hardware address used for agent identification
207 209
sub get_mac_address() {
208
	my $sysfile = '/sys/class/net/eth0/address';
210
	my $sysfile = '/sys/class/net/'.$mac.'/address';
209 211
	my $mac = '';
210 212
	if ( -e $sysfile ) {
211 213
		open(SYSFILE,"<$sysfile");