IPv6 fix in gencode scripts.
This commit is contained in:
		
					parent
					
						
							
								ca9dd7338a
							
						
					
				
			
			
				commit
				
					
						4ddf6557e3
					
				
			
		
					 4 changed files with 42 additions and 5 deletions
				
			
		| 
						 | 
					@ -66,8 +66,17 @@ destination_upload="\$($__remote_exec $__target_host "mktemp $tempfile_template"
 | 
				
			||||||
DONE
 | 
					DONE
 | 
				
			||||||
      if [ "$upload_file" ]; then
 | 
					      if [ "$upload_file" ]; then
 | 
				
			||||||
         echo upload >> "$__messages_out"
 | 
					         echo upload >> "$__messages_out"
 | 
				
			||||||
 | 
					         # IPv6 fix
 | 
				
			||||||
 | 
					         case "${__target_host}" in
 | 
				
			||||||
 | 
					             *:*)
 | 
				
			||||||
 | 
					                 my_target_host="[${__target_host}]"
 | 
				
			||||||
 | 
					                 ;;
 | 
				
			||||||
 | 
					             *)
 | 
				
			||||||
 | 
					                 my_target_host="${__target_host}"
 | 
				
			||||||
 | 
					                 ;;
 | 
				
			||||||
 | 
					         esac
 | 
				
			||||||
         cat << DONE
 | 
					         cat << DONE
 | 
				
			||||||
$__remote_copy "$source" "${__target_host}:\$destination_upload"
 | 
					$__remote_copy "$source" "${my_target_host}:\$destination_upload"
 | 
				
			||||||
DONE
 | 
					DONE
 | 
				
			||||||
      fi
 | 
					      fi
 | 
				
			||||||
# move uploaded file into place
 | 
					# move uploaded file into place
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -43,7 +43,16 @@ basepresent="$(cat "$__object/explorer/basepresent")"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if [ "$state" = "present" ]; then
 | 
					if [ "$state" = "present" ]; then
 | 
				
			||||||
   if [ "$basepresent" = "NONE" ]; then
 | 
					   if [ "$basepresent" = "NONE" ]; then
 | 
				
			||||||
      echo "$__remote_copy" "${jailbase}" "$__target_host:${remotebase}"
 | 
					     # IPv6 fix
 | 
				
			||||||
 | 
					     case "${__target_host}" in
 | 
				
			||||||
 | 
					         *:*)
 | 
				
			||||||
 | 
					             my_target_host="[${__target_host}]"
 | 
				
			||||||
 | 
					             ;;
 | 
				
			||||||
 | 
					         *)
 | 
				
			||||||
 | 
					             my_target_host="${__target_host}"
 | 
				
			||||||
 | 
					             ;;
 | 
				
			||||||
 | 
					     esac
 | 
				
			||||||
 | 
					      echo "$__remote_copy" "${jailbase}" "${my_target_host}:${remotebase}"
 | 
				
			||||||
   fi   # basepresent=NONE
 | 
					   fi   # basepresent=NONE
 | 
				
			||||||
fi   # state=present
 | 
					fi   # state=present
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -39,7 +39,16 @@ basepresent="$(cat "$__object/explorer/basepresent")"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if [ "$state" = "present" ]; then
 | 
					if [ "$state" = "present" ]; then
 | 
				
			||||||
   if [ "$basepresent" = "NONE" ]; then
 | 
					   if [ "$basepresent" = "NONE" ]; then
 | 
				
			||||||
      echo "$__remote_copy" "${jailbase}" "$__target_host:${remotebase}"
 | 
					     # IPv6 fix
 | 
				
			||||||
 | 
					     case "${__target_host}" in
 | 
				
			||||||
 | 
					         *:*)
 | 
				
			||||||
 | 
					             my_target_host="[${__target_host}]"
 | 
				
			||||||
 | 
					             ;;
 | 
				
			||||||
 | 
					         *)
 | 
				
			||||||
 | 
					             my_target_host="${__target_host}"
 | 
				
			||||||
 | 
					             ;;
 | 
				
			||||||
 | 
					     esac
 | 
				
			||||||
 | 
					      echo "$__remote_copy" "${jailbase}" "${my_target_host}:${remotebase}"
 | 
				
			||||||
   fi   # basepresent=NONE
 | 
					   fi   # basepresent=NONE
 | 
				
			||||||
fi   # state=present
 | 
					fi   # state=present
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -59,12 +59,22 @@ case $uname in
 | 
				
			||||||
      ;;
 | 
					      ;;
 | 
				
			||||||
esac
 | 
					esac
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# IPv6 fix
 | 
				
			||||||
 | 
					case "${__target_host}" in
 | 
				
			||||||
 | 
					 *:*)
 | 
				
			||||||
 | 
					     my_target_host="[${__target_host}]"
 | 
				
			||||||
 | 
					     ;;
 | 
				
			||||||
 | 
					 *)
 | 
				
			||||||
 | 
					     my_target_host="${__target_host}"
 | 
				
			||||||
 | 
					     ;;
 | 
				
			||||||
 | 
					esac
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if [ -n "${cksum}" ]; then
 | 
					if [ -n "${cksum}" ]; then
 | 
				
			||||||
   if [ ! "\${currentSum}" = "${cksum}" ]; then
 | 
					   if [ ! "\${currentSum}" = "${cksum}" ]; then
 | 
				
			||||||
      $__remote_copy "${source}" "$__target_host:${rcvar}.new"
 | 
					      $__remote_copy "${source}" "${my_target_host}:${rcvar}.new"
 | 
				
			||||||
   fi
 | 
					   fi
 | 
				
			||||||
else # File just doesn't exist yet
 | 
					else # File just doesn't exist yet
 | 
				
			||||||
   $__remote_copy "${source}" "$__target_host:${rcvar}.new"
 | 
					   $__remote_copy "${source}" "${my_target_host}:${rcvar}.new"
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
EOF
 | 
					EOF
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue