forked from ungleich-public/cdist
		
	[explorer/os] Fix OS detection for openSUSE
All distros with ID_LIKE suse should be treated as "suse". My openSUSE Leap 15.1 installation has: ID_LIKE="suse opensuse" This patch doesn't require a strict "suse" value but only the word suse to be in the list.
This commit is contained in:
		
					parent
					
						
							
								7e1428ab3c
							
						
					
				
			
			
				commit
				
					
						b370b70ff4
					
				
			
		
					 1 changed files with 2 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -144,7 +144,8 @@ esac
 | 
			
		|||
 | 
			
		||||
if [ -f /etc/os-release ]; then
 | 
			
		||||
   # after sles15, suse don't provide an /etc/SuSE-release anymore, but there is almost no difference between sles and opensuse leap, so call it suse
 | 
			
		||||
   if grep -q ^ID_LIKE=\"suse\" /etc/os-release 2>/dev/null; then
 | 
			
		||||
   if (. /etc/os-release && echo "${ID_LIKE}" | grep -q '\(^\|\ \)suse\($\|\ \)')
 | 
			
		||||
   then
 | 
			
		||||
      echo suse
 | 
			
		||||
      exit 0
 | 
			
		||||
   fi
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue