Skip to content

Commit

Permalink
ovs-save: Replace "echo -n" with "printf"
Browse files Browse the repository at this point in the history
This is neeed since "echo -n" is not POSIX and may not work with some shells.

Signed-off-by: Timothy Redaelli <tredaelli@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Flavio Leitner <fbl@sysclose.org>
  • Loading branch information
drizzt authored and blp committed Oct 27, 2017
1 parent 463a057 commit 221df99
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions utilities/ovs-save
Expand Up @@ -115,13 +115,13 @@ save_flows () {
# Get the highest enabled OpenFlow version
ofp_version=$(get_highest_ofp_version "$bridge")

echo -n "ovs-ofctl add-tlv-map ${bridge} '"
printf "%s" "ovs-ofctl add-tlv-map ${bridge} '"
ovs-ofctl dump-tlv-map ${bridge} | \
awk '/^ 0x/ {if (cnt != 0) printf ","; \
cnt++;printf "{class="$1",type="$2",len="$3"}->"$4}'
echo "'"

echo -n "ovs-ofctl -O $ofp_version add-flows ${bridge} " \
printf "%s" "ovs-ofctl -O $ofp_version add-flows ${bridge} " \
"\"$workdir/$bridge.flows.dump\""

# If possible, use OpenFlow 1.4 atomic bundle transaction to add flows
Expand Down

0 comments on commit 221df99

Please sign in to comment.