[Ovirt-devel] [PATCH node] always use absolute path for persistent files

Darryl L. Pierce dpierce at redhat.com
Wed Apr 8 12:23:13 UTC 2009


On Wed, Apr 08, 2009 at 12:02:20PM +0200, Alan Pevec wrote:
> Signed-off-by: Alan Pevec <apevec at redhat.com>
> ---
>  scripts/ovirt-functions |    7 ++++---
>  1 files changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/scripts/ovirt-functions b/scripts/ovirt-functions
> index 4024efa..a3991c0 100755
> --- a/scripts/ovirt-functions
> +++ b/scripts/ovirt-functions
> @@ -408,11 +408,12 @@ ovirt_store_config() {
>      rc=0
>      if grep -q " /config ext3" /proc/mounts; then
>          printf "storing to /config :\n"
> -        for f in "$@"; do
> +        for p in "$@"; do
> +            f=$(readlink -f $p)
>              printf "$f"
>              # skip if file does not exist or is empty
> -            if [ ! -s $f ]; then
> -                printf " Skipping, file does not exist or is empty\n"
> +            if [ ! -s "$f" ]; then
> +                printf " Skipping, file '%s' does not exist or is empty\n" $p
>                  continue
>              fi
>              # skip if already bind-mounted

ACK.

-- 
Darryl L. Pierce, Sr. Software Engineer @ Red Hat, Inc.
Virtual Machine Management - http://www.ovirt.org/
Is fearr Gaeilge bhriste ná Béarla cliste.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/ovirt-devel/attachments/20090408/787ccd29/attachment.sig>


More information about the ovirt-devel mailing list