mirror of
				https://github.com/librenms/librenms.git
				synced 2024-10-07 16:52:45 +00:00 
			
		
		
		
	distro script: Ignore /etc/lsb-release on Arch systems
On Arch systems, /etc/lsb-release contains the placeholder version string "rolling". Prevent parsing /etc/lsb-release on Arch systems to the script won't report the distribution "Arch rolling".
This commit is contained in:
		@@ -40,11 +40,12 @@ elif [ "${OS}" = "Linux" ] ; then
 | 
			
		||||
  elif [ -f /etc/arch-release ] ; then
 | 
			
		||||
    DIST="Arch Linux"
 | 
			
		||||
    REV="" # Omit version since Arch Linux uses rolling releases
 | 
			
		||||
    IGNORE_LSB=1 # /etc/lsb-release would overwrite $REV with "rolling"
 | 
			
		||||
  elif [ -f /etc/UnitedLinux-release ] ; then
 | 
			
		||||
    DIST="${DIST}[`cat /etc/UnitedLinux-release | tr "\n" ' ' | sed s/VERSION.*//`]"
 | 
			
		||||
  fi
 | 
			
		||||
 | 
			
		||||
  if [ -f /etc/lsb-release ] ; then
 | 
			
		||||
  if [ -f /etc/lsb-release -a "${IGNORE_LSB}" != 1 ] ; then
 | 
			
		||||
    LSB_DIST="`cat /etc/lsb-release | grep DISTRIB_ID | cut -d "=" -f2`"
 | 
			
		||||
    LSB_REV="`cat /etc/lsb-release | grep DISTRIB_RELEASE | cut -d "=" -f2`"
 | 
			
		||||
    if [ "$LSB_DIST" != "" ] ; then
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user