Skip to content

Commit

Permalink
Low: RA: VirtualDomain: shorten the big sed expression
Browse files Browse the repository at this point in the history
  • Loading branch information
dmuhamedagic committed Dec 23, 2008
1 parent 5776881 commit 48501c8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion heartbeat/VirtualDomain
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ VirtualDomain_Migrate_To() {
transport_suffix="+${OCF_RESKEY_migration_transport}"
fi
# Scared of that sed expression? So am I. :-)
remoteuri=$(echo ${OCF_RESKEY_hypervisor} | sed -e "s/\(.*\):\/\/[^\/\:]*\(:\?[0-9]*\)\/\(.*\)/\1${transport_suffix}:\/\/${target_node}\2\/\3/")
remoteuri=$(echo ${OCF_RESKEY_hypervisor} | sed -e "s,\(.*\)://[^/:]*\(:\?[0-9]*\)/\(.*\),\1${transport_suffix}://${target_node}\2/\3,")

# OK, we know where to connect to. Now do the actual migration.
ocf_log info "$DOMAIN_NAME: Starting live migration to ${remoteuri}"
Expand Down

0 comments on commit 48501c8

Please sign in to comment.