[Ovirt-devel] [PATCH node] generalized configuration persistence for oVirt Node

Perry N. Myers pmyers at redhat.com
Fri Sep 19 19:42:08 UTC 2008


Alan Pevec wrote:
> If local OVIRT partition is available, persist selected configuration files,
> for now: Kerberos config, libvirt keytab and SSH host key.
> 
> To initialize OVIRT partition, boot oVirt Node with ovirt_init=scsi parameter,
> this will format the first disk and create the partition.
> For more details see http://ovirt.org/page/Local_Disk_Usage

Tested this and seems to work so ACK.  Fixed one minor typo below...

<snip>
> +# persist configuration to /config on OVIRT partition
> +#   ovirt_store_config /etc/config /etc/config2 ...
> +ovirt_store_config() {
> +    ovirt=$(mktemp -d)
> +    ovirt_mount $ovirt
> +    cfg=$ovirt/config
> +    rw=0
> +    printf "store config:"
> +    for f in "$@"; do
> +       # ignore non-/etc paths
> +       if [ $f != ${f#/etc/} ]; then
> +           # check if changed
> +           if [ "$(md5 $f)" != "$(md5 $cfg$f)" ]; then
> +               if [ $rw = 0 ]; then
> +                   mount -o remount,rw $ovirt
> +                   rw=1
> +               fi
> +               mkdir -p $cfg$(dirname $f)
> +               cp $f $cfg$f
> +               print " $f"

This should be printf

I fixed the patch and pushed this to the repo.

Perry




More information about the ovirt-devel mailing list