Updates to the distro script are now resulting in errors (bash: /usr/bin/distro: Permission denied)
royvandongen opened this issue · 1 comments
After recent installations of LibreNMS following any of the manuals online, or, in my case primarily when using Ansible to install my servers i have noticed the LibreNMS GUI did not recognize the distro anymore.
Showing stuff like "Linux 5.4.0-48-generic (bash: /usr/bin/distro: Permission denied)" instead of the real Distro.
After looking into it, i have found a change to the Distro script which is provided in this repository, and when i commented linenums 67-75 the script started to work again. This made me believe the newly added feature to discover a distro based on the "sudo /usr/bin/pmgversion" command do not have the right outcome for people who are just following the guide.
For now i have cloned the old distroscript to my ansible stack, but it might be a good thing to either update the script to make sure it does work, or update the manuals all over the internet in order to fix the sudo permissions.
I was running into a similar issue where it didn't seem to get_url correctly. I ended up putting the file on my Ansible host, and then doing a copy of the file and changing the permissions and ownership after the file copied. I noticed with the distro file in the documentation that one is a 'curl -o url' where others are wget, which seems to work better with Ansible. There may be a way to do it with Ansible, but felt copy was the easier/quicker solution.