mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-31 01:35:36 +02:00
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:
commit
774156980f
@ -81,6 +81,9 @@ cp -aRf man/man1/* temp_package/usr/share/man/man1/
|
|||||||
# Relocate plugins to the final dir and delete
|
# Relocate plugins to the final dir and delete
|
||||||
cp temp_package/usr/share/pandora_agent/plugins/* temp_package/etc/pandora/plugins
|
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
|
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.
|
#Disabled, now the package overwrite the previous files.
|
||||||
|
@ -460,15 +460,19 @@ close (FILE);
|
|||||||
$Mode = 'LSHW';
|
$Mode = 'LSHW';
|
||||||
$Separator = '\s+\*\-';
|
$Separator = '\s+\*\-';
|
||||||
my @hwinfo;
|
my @hwinfo;
|
||||||
|
my $lshwpath = $0 =~ s/inventory/lshw/r ;
|
||||||
if (is_enabled $AIX) {
|
if (is_enabled $AIX) {
|
||||||
$Separator = '^\s*$';
|
$Separator = '^\s*$';
|
||||||
@hwinfo=`prtconf 2>/dev/null`;
|
@hwinfo=`prtconf 2>/dev/null`;
|
||||||
} else {
|
} else {
|
||||||
@hwinfo = `lshw 2>/dev/null`;
|
@hwinfo = `lshw 2>/dev/null`;
|
||||||
if ($? != 0) {
|
if ($? != 0) {
|
||||||
$Mode = 'HWINFO';
|
@hwinfo = `$lshwpath 2>/dev/null`;
|
||||||
$Separator = 'Hardware Class:';
|
if ($? != 0) {
|
||||||
@hwinfo = `hwinfo --cpu --memory --gfxcard --netcard --cdrom --disk 2>/dev/null`;
|
$Mode = 'HWINFO';
|
||||||
|
$Separator = 'Hardware Class:';
|
||||||
|
@hwinfo = `hwinfo --cpu --memory --gfxcard --netcard --cdrom --disk 2>/dev/null`;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user