summaryrefslogtreecommitdiff
path: root/utilities
diff options
context:
space:
mode:
authorBen Pfaff <blp@nicira.com>2011-06-21 15:12:49 -0700
committerBen Pfaff <blp@nicira.com>2011-06-21 15:12:49 -0700
commit751d0ddbedf919854da3d2c6e5ed76b755c15920 (patch)
treef9135e84e4e0ff316ee788452641e2b43b181f30 /utilities
parent6bba6039d78728d39a2d826eba0f61949e1809a3 (diff)
downloadopenvswitch-751d0ddbedf919854da3d2c6e5ed76b755c15920.tar.gz
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.
Diffstat (limited to 'utilities')
-rwxr-xr-xutilities/ovs-ctl.in7
1 files changed, 5 insertions, 2 deletions
diff --git a/utilities/ovs-ctl.in b/utilities/ovs-ctl.in
index 923e1b539..a127149a0 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"