Fix shell IPv6 testing (for -e).
This commit is contained in:
		
					parent
					
						
							
								36244b8a11
							
						
					
				
			
			
				commit
				
					
						ca424a34e6
					
				
			
		
					 4 changed files with 4 additions and 8 deletions
				
			
		| 
						 | 
				
			
			@ -67,8 +67,7 @@ DONE
 | 
			
		|||
      if [ "$upload_file" ]; then
 | 
			
		||||
         echo upload >> "$__messages_out"
 | 
			
		||||
         # IPv6 fix
 | 
			
		||||
         echo "${__target_host}" | grep -q -E '^[0-9a-fA-F:]+$'
 | 
			
		||||
         if [ $? -eq 0 ]
 | 
			
		||||
         if $(echo "${__target_host}" | grep -q -E '^[0-9a-fA-F:]+$')
 | 
			
		||||
         then
 | 
			
		||||
             my_target_host="[${__target_host}]"
 | 
			
		||||
         else
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -44,8 +44,7 @@ basepresent="$(cat "$__object/explorer/basepresent")"
 | 
			
		|||
if [ "$state" = "present" ]; then
 | 
			
		||||
   if [ "$basepresent" = "NONE" ]; then
 | 
			
		||||
     # IPv6 fix
 | 
			
		||||
     echo "${__target_host}" | grep -q -E '^[0-9a-fA-F:]+$'
 | 
			
		||||
     if [ $? -eq 0 ]
 | 
			
		||||
     if $(echo "${__target_host}" | grep -q -E '^[0-9a-fA-F:]+$')
 | 
			
		||||
     then
 | 
			
		||||
         my_target_host="[${__target_host}]"
 | 
			
		||||
     else
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -40,8 +40,7 @@ basepresent="$(cat "$__object/explorer/basepresent")"
 | 
			
		|||
if [ "$state" = "present" ]; then
 | 
			
		||||
   if [ "$basepresent" = "NONE" ]; then
 | 
			
		||||
     # IPv6 fix
 | 
			
		||||
     echo "${__target_host}" | grep -q -E '^[0-9a-fA-F:]+$'
 | 
			
		||||
     if [ $? -eq 0 ]
 | 
			
		||||
     if $(echo "${__target_host}" | grep -q -E '^[0-9a-fA-F:]+$')
 | 
			
		||||
     then
 | 
			
		||||
         my_target_host="[${__target_host}]"
 | 
			
		||||
     else
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -60,8 +60,7 @@ case $uname in
 | 
			
		|||
esac
 | 
			
		||||
 | 
			
		||||
# IPv6 fix
 | 
			
		||||
echo "${__target_host}" | grep -q -E '^[0-9a-fA-F:]+$'
 | 
			
		||||
if [ $? -eq 0 ]
 | 
			
		||||
if $(echo "${__target_host}" | grep -q -E '^[0-9a-fA-F:]+$')
 | 
			
		||||
then
 | 
			
		||||
    my_target_host="[${__target_host}]"
 | 
			
		||||
else
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue