1
0
mirror of https://github.com/librenms/librenms-agent.git synced 2024-05-09 09:54:52 +00:00

Added FreeNAS Version support (#215)

Hi, 

I added FreeNAS version information support, as shown in the figure:

![2018-12-15 11 53 31](https://user-images.githubusercontent.com/30381035/50044886-2329a580-00c5-11e9-817c-b89a8374270d.png)
![2018-12-15 11 53 49](https://user-images.githubusercontent.com/30381035/50044887-2329a580-00c5-11e9-93b4-b140809f84a3.png)
This commit is contained in:
Jason Cheng
2018-12-16 22:21:00 +08:00
committed by Neil Lathwood
parent 3c4511d987
commit 433d744953

View File

@ -125,7 +125,12 @@ elif [ "${OS}" = "Darwin" ] ; then
fi
elif [ "${OS}" = "FreeBSD" ] ; then
OSSTR=`/usr/bin/uname -mior`
DIST=$(cat /etc/version | cut -d'-' -f 1)
if [ "${DIST}" = "FreeNAS" ]; then
OSSTR=`cat /etc/version | cut -d' ' -f 1`
else
OSSTR=`/usr/bin/uname -mior`
fi
fi
echo ${OSSTR}