mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-12 16:06:25 +02:00
distro script: Handle cases where a distribution's version string is empty
This commit is contained in:
+7
-1
@@ -59,7 +59,13 @@ elif [ "${OS}" = "Linux" ] ; then
|
||||
fi
|
||||
|
||||
# OSSTR="${OS} ${DIST} ${REV}(${PSEUDONAME} ${KERNEL} ${MACH})"
|
||||
OSSTR="${DIST} ${REV}"
|
||||
if [ -n "${REV}" ]
|
||||
then
|
||||
OSSTR="${DIST} ${REV}"
|
||||
else
|
||||
OSSTR="${DIST}"
|
||||
fi
|
||||
|
||||
elif [ "${OS}" = "Darwin" ] ; then
|
||||
if [ -f /usr/bin/sw_vers ] ; then
|
||||
OSSTR=`/usr/bin/sw_vers|grep -v Build|sed 's/^.*:.//'| tr "\n" ' '`
|
||||
|
||||
Reference in New Issue
Block a user