Suggested-by: Andrew Evans <aevans@nicira.com>
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"
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"
}
## ---- ##