Mike Burns
2011-Sep-09 19:11 UTC
[Ovirt-devel] [PATCH node] only wipe HostVG if storage_init is not passed in dracut
rhbz#736971 Signed-off-by: Mike Burns <mburns at redhat.com> --- dracut/ovirt-cleanup.sh | 15 ++++++++++----- 1 files changed, 10 insertions(+), 5 deletions(-) diff --git a/dracut/ovirt-cleanup.sh b/dracut/ovirt-cleanup.sh index c96d6fe..e9674d8 100755 --- a/dracut/ovirt-cleanup.sh +++ b/dracut/ovirt-cleanup.sh @@ -48,11 +48,16 @@ fi # Check for HostVG lvm pvscan >/dev/null 2>&1 -for hostvg in $(lvm pvs --noheadings -o vg_name,pv_name 2>/dev/null | awk '/^ HostVG/{print $2}'); do - storage_init="$hostvg,$storage_init" - info "Found HostVG on $hostvg" -done - +if [ -z "$storage_init" ]; then + for hostvg in $(lvm pvs --noheadings -o vg_name,pv_name 2>/dev/null | awk '/^ HostVG/{print $2}'); do + if [ -z "$storage_init" ]; then + storage_init="$hostvg" + else + storage_init="$hostvg,$storage_init" + fi + info "Found HostVG on $hostvg" + done +fi # storage_init is passed in a specific format # A comma separated list of HostVG devices -- 1.7.4.4
Reasonably Related Threads
- [PATCH node] always remove HostVG in dracut when reinstall/uninstall/firstboot passed
- [PATCH node] add ability to select separate disks for Root and HostVG in o-c-storage
- [PATCH node] Add debugging info to dracut plugin
- [PATCH node] fix install when VG exists on disk
- Hook script to preserve one partition untouched during install