Suggested-by: Andrew Evans <[email protected]>
---
 utilities/ovs-ctl.in |   14 ++++++++++++--
 1 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/utilities/ovs-ctl.in b/utilities/ovs-ctl.in
index a127149..44afbd2 100755
--- a/utilities/ovs-ctl.in
+++ b/utilities/ovs-ctl.in
@@ -233,7 +233,8 @@ force_reload_kmod () {
     stop
 
     script=`mktemp`
-    if action "Save interface configuration to $script" save_interfaces; then
+    trap 'rm -f "$script"' 0 1 2 13 15
+    if action "Saving interface configuration" save_interfaces; then
         :
     else
         log_warning_msg "Failed to save configuration, not replacing kernel 
module"
@@ -252,7 +253,16 @@ force_reload_kmod () {
 
     start
 
-    action "Restore interface configuration from $script" "$script"
+    action "Restoring interface configuration" "$script"
+    rc=$?
+    if test $rc = 0; then
+        level=debug
+    else
+        level=err
+    fi
+    log="logger -p daemon.$level -t ovs-save"
+    $log "force-reload-kmod interface restore script exited with status $rc:"
+    $log -f "$script"
 }
 
 ## ---- ##
-- 
1.7.4.4

_______________________________________________
dev mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/dev

Reply via email to