mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Agent: Packages fixes (+pacman) (#15415)
* Agent: Packages fixes Don't try to save invalid packages, probably due to script failure on device. Add pacman support * Apply fixes from StyleCI * Add version * cast to number * Update includes/polling/unix-agent/packages.inc.php Co-authored-by: Jellyfrog <Jellyfrog@users.noreply.github.com> --------- Co-authored-by: StyleCI Bot <bot@styleci.io> Co-authored-by: Jellyfrog <Jellyfrog@users.noreply.github.com>
This commit is contained in:
@@ -50,4 +50,9 @@ class Package extends DeviceRelatedModel implements Keyable
|
||||
{
|
||||
return $this->name . ' (' . $this->arch . ') version ' . $this->version . ($this->build ? "-$this->build" : '');
|
||||
}
|
||||
|
||||
public function isValid(): bool
|
||||
{
|
||||
return $this->name && $this->manager && $this->arch && $this->version;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user