[Ovirt-devel] [PATCH node][RFC] Fix uninstall to detect and cleanup correct partitions

Mike Burns mburns at redhat.com
Tue Mar 23 22:50:53 UTC 2010


After starting testing, I found a number of other small issues with
this.  The overall structure is the same, but a new patch is coming
shortly that should clean up the small issues.  

Mike

On Tue, 2010-03-23 at 17:15 -0400, Mike Burns wrote:
> For anyone testing this, there is a typo:
> 
> <snip
> 
> > diff --git a/scripts/ovirt-functions b/scripts/ovirt-functions
> > index c2ef94b..0c30890 100644
> > --- a/scripts/ovirt-functions
> > +++ b/scripts/ovirt-functions
> > @@ -851,6 +851,33 @@ get_dm_device ()
> >      return $rc
> >  }
> > 
> > +#Function to determine partition and device names
> > +get_part_info() {
> > +    local drive_in=$1
> > +    local dev_var=$2
> > +    local part_var=$3
> > +    local devname_1 devname2 part_number
> > +    local rc=0
> > +
> > +    eval $(readlink -f /dev/disk/by-label/$grub_dev_label|awk {'
> > +        print "devname_1=" substr($1,1,length($1)-1);
> > +        print "devname_2=" substr($1,1,length($1)-2);
> > +        part_number=substr($1,length($1),1); partN--;
> > +        print "part_number=" part_number;
> > +    }')
> > +    rc=$?
> > +
> > +    if [ -e ${devname_1} ]; then
> > +        eval "${dev_var}"="${devname_1}"
> > +    elif [ -e ${devname_2 ]; then
> + elif [ -e ${devname_2} ]; then   #<-- missing }
> > +        eval "${dev_var}"="${devname_2}"
> > +    else
> > +        return 1
> > +    fi
> > +    eval "${part_var}"="${part_number}"
> > +    return $rc
> > +}
> > +
> >  # execute a function if called as a script, e.g.
> >  #   ovirt-functions ovirt_store_config /etc/hosts
> > 
> 
> 
> 
> _______________________________________________
> Ovirt-devel mailing list
> Ovirt-devel at redhat.com
> https://www.redhat.com/mailman/listinfo/ovirt-devel





More information about the ovirt-devel mailing list