[Ovirt-devel] [PATCH node] Add removal of the boot partition to the uninstall feature.
Alan Pevec
apevec at gmail.com
Wed Feb 25 23:08:50 UTC 2009
On Wed, Feb 25, 2009 at 7:38 PM, Darryl L. Pierce <dpierce at redhat.com> wrote:
> + log "Labeling boot partition"
> + tune2fs -L OVBOOT ${DRIVE}1
it's already labeled when fs is created: mke2fs -j "${DRIVE}1" -L "BOOT"
so old local installations with BOOT won't be uninstalled if we change
to OVBOOT now.
Did you want to change to OVBOOT to lower the conflict possibility?
Default RHEL/Fedora uses lablel "/boot" so BOOT shouldn't have
conflicts.
Also, label BOOT is used at least in mount_boot() so that would need
to be adjusted.
> + partition=$(findfs LABEL=OVBOOT)
> + if [ -n "$partition" ]; then
> + log "Unmounting boot partition"
> + umount $partition
> + log "Removing partitions"
> + drive=$(echo $partition | awk '{ match($0, "(.*)[0-9]$", drive); print drive[1] }')
or just: awk '{ print substr($0,1,length($0)-1); }'
> + parted -s $drive "rm 1"
> + parted -s $drive "rm 2"
> + fi
> + printf "Finished uninstalling node."
More information about the ovirt-devel
mailing list