diff options
| author | Ben Pfaff <blp@nicira.com> | 2011-06-21 15:12:49 -0700 |
|---|---|---|
| committer | Ben Pfaff <blp@nicira.com> | 2011-06-21 15:12:49 -0700 |
| commit | 751d0ddbedf919854da3d2c6e5ed76b755c15920 (patch) | |
| tree | f9135e84e4e0ff316ee788452641e2b43b181f30 /utilities | |
| parent | 6bba6039d78728d39a2d826eba0f61949e1809a3 (diff) | |
| download | openvswitch-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-x | utilities/ovs-ctl.in | 7 |
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" |
