Fix SC2046.
This commit is contained in:
		
					parent
					
						
							
								b25aff17c6
							
						
					
				
			
			
				commit
				
					
						ed542cc7cb
					
				
			
		
					 3 changed files with 4 additions and 4 deletions
				
			
		| 
						 | 
				
			
			@ -83,7 +83,7 @@ present="$(cat "$__object/explorer/present")"
 | 
			
		|||
status="$(cat "$__object/explorer/status")"
 | 
			
		||||
 | 
			
		||||
# Handle ip="addr, addr" format
 | 
			
		||||
if [ $(expr "${ip}" : ".*, .*") -gt "0" ]; then
 | 
			
		||||
if [ "$(expr "${ip}" : ".*, .*")" -gt "0" ]; then
 | 
			
		||||
   SAVE_IFS="$IFS"
 | 
			
		||||
   IFS=", "
 | 
			
		||||
   for cur_ip in ${ip}; do
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -86,7 +86,7 @@ present="$(cat "$__object/explorer/present")"
 | 
			
		|||
status="$(cat "$__object/explorer/status")"
 | 
			
		||||
 | 
			
		||||
# Handle ip="iface|addr, iface|addr" format
 | 
			
		||||
if [ $(expr "${ip}" : ".*|.*") -gt "0" ]; then
 | 
			
		||||
if [ "$(expr "${ip}" : ".*|.*")" -gt "0" ]; then
 | 
			
		||||
   # If we have multiple IPs defined, $interface doesn't make sense because ip="iface|addr, iface|addr" implies it
 | 
			
		||||
   interface=""
 | 
			
		||||
   SAVE_IFS="$IFS"
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -38,11 +38,11 @@ fi
 | 
			
		|||
pkg_version="$(cat "$__object/explorer/pkg_version")"
 | 
			
		||||
if [ -z "$pkg_version" ]; then
 | 
			
		||||
    state_is="absent"
 | 
			
		||||
elif [ -z "$version" ] && [ $(echo "$pkg_version" | wc -l) -gt 1 ]; then
 | 
			
		||||
elif [ -z "$version" ] && [ "$(echo "$pkg_version" | wc -l)" -gt 1 ]; then
 | 
			
		||||
    echo "Package name is not unique! The following packages are installed:"
 | 
			
		||||
    echo "$pkg_version"
 | 
			
		||||
    exit 1
 | 
			
		||||
elif [ -n "$version" ] && [ $(echo "$pkg_version" | cut -d " " -f 1 | sort | uniq | wc -l) -gt 1 ]; then
 | 
			
		||||
elif [ -n "$version" ] && [ "$(echo "$pkg_version" | cut -d " " -f 1 | sort | uniq | wc -l)" -gt 1 ]; then
 | 
			
		||||
    echo "Package name is not unique! The following packages are installed:"
 | 
			
		||||
    echo "$pkg_version"
 | 
			
		||||
    exit 1
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue