[ovs-dev] [db-backup 5/5] Avoid unneeded database compaction at startup, and improve backups.

Ethan Jackson ethan at nicira.com
Tue Feb 15 19:33:42 UTC 2011

This looks fine to me. However I'm certainty not the worlds best shell

> +        elif test "X`ovsdb-tool needs-conversion $conf_file $schema_file`" != Xno; then
> +            # Back up the old version.
> +            version=`ovsdb-tool db-version "$conf_file"`
> +            cksum=`ovsdb-tool db-cksum "$conf_file" | awk '{print $1}'`

I would tend to prefer to prepend the cksum with something so we don't
end up creating a hidden file in the case where there is no cksum.

ovsdb-tool db-cksum "/usr/local/etc/ovs-vswitchd.conf.db" | awk
'{printf("ck%d\n", $1)}'

Looks Good.

More information about the dev mailing list