mirror of
				https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
				synced 2025-11-04 04:38:02 +00:00 
			
		
		
		
	Better logic to determine which packages are installed
Signed-off-by: Matthew Stidham <stidmatt@protonmail.com>
This commit is contained in:
		@@ -20,9 +20,9 @@ present=(
 | 
				
			|||||||
)
 | 
					)
 | 
				
			||||||
killcommand=0
 | 
					killcommand=0
 | 
				
			||||||
for i in "${present[@]}"; do
 | 
					for i in "${present[@]}"; do
 | 
				
			||||||
  $present=$(rpm -qa | grep i)
 | 
					  present=$(expr length "$(rpm -qa | grep $i)")
 | 
				
			||||||
  if [[ $present -gt 0 ]]; then
 | 
					  if [[ $present -gt 0 ]]; then
 | 
				
			||||||
    pass
 | 
					    :
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
    killcommand=1
 | 
					    killcommand=1
 | 
				
			||||||
    echo "Please install $i on your system"
 | 
					    echo "Please install $i on your system"
 | 
				
			||||||
@@ -32,7 +32,7 @@ done
 | 
				
			|||||||
if [[ $killcommand -gt 0 ]]; then
 | 
					if [[ $killcommand -gt 0 ]]; then
 | 
				
			||||||
  exit 1
 | 
					  exit 1
 | 
				
			||||||
else
 | 
					else
 | 
				
			||||||
  pass
 | 
					  :
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
output_dir=diag_report
 | 
					output_dir=diag_report
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user