forked from ungleich-public/cdist
		
	make __package_apt use DEBIAN_FRONTEND=noninteractive
Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
This commit is contained in:
		
					parent
					
						
							
								1b87fc7c3f
							
						
					
				
			
			
				commit
				
					
						cee51f0088
					
				
			
		
					 1 changed files with 4 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -37,17 +37,19 @@ fi
 | 
			
		|||
state="$(cat "$__object/parameter/state")"
 | 
			
		||||
is_installed="$(grep "^Status: install ok installed" "$__object/explorer/pkg_status" || true)"
 | 
			
		||||
 | 
			
		||||
aptget="DEBIAN_FRONTEND=noninteractive apt-get --quiet --yes"
 | 
			
		||||
 | 
			
		||||
case "$state" in
 | 
			
		||||
   installed)
 | 
			
		||||
      # Install only if non-existent
 | 
			
		||||
      if [ -z "$is_installed" ]; then
 | 
			
		||||
         echo apt-get --quiet --yes install \"$name\"
 | 
			
		||||
         echo $aptget install \"$name\"
 | 
			
		||||
      fi
 | 
			
		||||
   ;;
 | 
			
		||||
   uninstalled)
 | 
			
		||||
      # Remove only if existent
 | 
			
		||||
      if [ -n "$is_installed" ]; then
 | 
			
		||||
         echo apt-get --quiet --yes remove \"$name\"
 | 
			
		||||
         echo $aptget remove \"$name\"
 | 
			
		||||
      fi
 | 
			
		||||
   ;;
 | 
			
		||||
esac
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue