Merge "Fix prestage ISO install abort if previous subcloud install exists"
This commit is contained in:
commit
a1acf1a0d1
|
@ -1103,30 +1103,28 @@ if check_prestage -eq 0 ; then
|
||||||
|
|
||||||
ilog "Searching for existing installation..."
|
ilog "Searching for existing installation..."
|
||||||
|
|
||||||
device_list=()
|
# Build up device_list to search for existing installation.
|
||||||
|
# We will look for the install_uuid file on each of the devices in the list.
|
||||||
|
# First, if volume groups have been enabled, we can mount /dev/cgts-vg/var-lv
|
||||||
|
device_list=("/dev/cgts-vg/var-lv")
|
||||||
|
|
||||||
|
# Now add the rest of the rootfs partitions to device_list
|
||||||
for part in "${part_numbers[@]}"; do
|
for part in "${part_numbers[@]}"; do
|
||||||
device=${rootfs_part_prefix}${part}
|
device_list+=("${rootfs_part_prefix}${part}")
|
||||||
device_list+=(${device})
|
|
||||||
ilog "Adding ${device}"
|
|
||||||
done
|
done
|
||||||
|
|
||||||
# adding the following device to the device list to search
|
ilog "Checking device_list: ${device_list[*]}"
|
||||||
# for the filesystem. If Volume Groups have been enabled,
|
for device in "${device_list[@]}"; do
|
||||||
# it is possible to perform the checks for install_guid below
|
|
||||||
# by mounting /dev/cgts-vg/var-lv.
|
|
||||||
device_list+=("/dev/cgts-vg/var-lv")
|
|
||||||
ilog "Adding /dev/cgts-vg/var-lv"
|
|
||||||
|
|
||||||
for part in "${device_list[@]}"; do
|
|
||||||
# mount this part at a temporary mount point
|
# mount this part at a temporary mount point
|
||||||
mount ${device} ${temp_mount}
|
ilog "Checking device: ${device}"
|
||||||
if [ $? -ne 0 ]; then
|
mount "${device}" "${temp_mount}"
|
||||||
wlog "Unable to mount ${device}"
|
rc=$?
|
||||||
|
if [ "${rc}" -ne 0 ]; then
|
||||||
|
wlog "Unable to mount ${device}, rc=${rc}"
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
# Check for the presence of install_uuid in one of the partitions on
|
# Check for the presence of install_uuid in one of the partitions on the device_list
|
||||||
# the root device
|
if [ -e "${temp_mount}/www/pages/feed/rel-xxxPLATFORM_RELEASExxx/install_uuid" ]; then
|
||||||
if [[ -e "${temp_mount}/www/pages/feed/rel-xxxPLATFORM_RELEASExxx/install_uuid" ]]; then
|
|
||||||
wlog "Found valid installation on ${device}"
|
wlog "Found valid installation on ${device}"
|
||||||
umount ${temp_mount}
|
umount ${temp_mount}
|
||||||
# Do not modify the system in any way
|
# Do not modify the system in any way
|
||||||
|
|
Loading…
Reference in New Issue