From 751d0ddbedf919854da3d2c6e5ed76b755c15920 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Tue, 21 Jun 2011 15:12:49 -0700 Subject: [PATCH] ovs-ctl: Use "action" to print success or failure directly. This displays errors in whatever fashion the distro prefers, which seems like a good idea. We have to use a shell function so that the redirection to a temporary file doesn't write the messages for the admin to the file instead of the console. --- utilities/ovs-ctl.in | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/utilities/ovs-ctl.in b/utilities/ovs-ctl.in index 923e1b53..a127149a 100755 --- a/utilities/ovs-ctl.in +++ b/utilities/ovs-ctl.in @@ -222,6 +222,10 @@ internal_interfaces () { done } +save_interfaces () { + "$datadir/scripts/ovs-save" $ifaces > "$script" +} + force_reload_kmod () { ifaces=`internal_interfaces` action "Detected internal interfaces: $ifaces" true @@ -229,8 +233,7 @@ force_reload_kmod () { stop script=`mktemp` - action "Save interface configuration to $script" true - if "$datadir/scripts/ovs-save" $ifaces > "$script"; then + if action "Save interface configuration to $script" save_interfaces; then : else log_warning_msg "Failed to save configuration, not replacing kernel module" -- 2.30.2