Merge branch 'ent-5876-anadir-el-binario-de-lshw-a-los-paquetes-del-agente-linux' into 'develop'

Fixed permissions for plugins

See merge request artica/pandorafms!3432
This commit is contained in:
Alejandro Fraguas 2020-09-07 14:59:42 +02:00
commit 774156980f
2 changed files with 10 additions and 3 deletions

View File

@ -81,6 +81,9 @@ cp -aRf man/man1/* temp_package/usr/share/man/man1/
# Relocate plugins to the final dir and delete
cp temp_package/usr/share/pandora_agent/plugins/* temp_package/etc/pandora/plugins
# Make sure the plugins have execution privileges
chmod 755 temp_package/etc/pandora/plugins/*
echo "Official plugins are placed on /etc/pandora/plugins" > temp_package/usr/share/pandora_agent/plugins/README
#Disabled, now the package overwrite the previous files.

View File

@ -460,15 +460,19 @@ close (FILE);
$Mode = 'LSHW';
$Separator = '\s+\*\-';
my @hwinfo;
my $lshwpath = $0 =~ s/inventory/lshw/r ;
if (is_enabled $AIX) {
$Separator = '^\s*$';
@hwinfo=`prtconf 2>/dev/null`;
} else {
@hwinfo = `lshw 2>/dev/null`;
if ($? != 0) {
$Mode = 'HWINFO';
$Separator = 'Hardware Class:';
@hwinfo = `hwinfo --cpu --memory --gfxcard --netcard --cdrom --disk 2>/dev/null`;
@hwinfo = `$lshwpath 2>/dev/null`;
if ($? != 0) {
$Mode = 'HWINFO';
$Separator = 'Hardware Class:';
@hwinfo = `hwinfo --cpu --memory --gfxcard --netcard --cdrom --disk 2>/dev/null`;
}
}
}