Skip to content

Commit

Permalink
Fixed the searching for devices in the same way that the usb live doe…
Browse files Browse the repository at this point in the history
…s (also for yum platform)
  • Loading branch information
juanje committed Dec 2, 2008
1 parent 3ca96ff commit b5efc09
Showing 1 changed file with 24 additions and 3 deletions.
27 changes: 24 additions & 3 deletions platforms/common-yum/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,10 @@ splash_display 'INSTALL..........'
pre_scsi_disk_number=$( ls /sys/class/scsi_disk | wc -l)
found=no
# Find the install disk
while true; do
for device in 'hda' 'hdb' 'sda' 'sdb'
do
while true
do
for try in '1' '2' '3'; do
for device in 'hda' 'hdb' 'sda' 'sdb' 'sdc' 'sdd'; do
echo "checking device: /dev/${device} for installation target"
if [ -e /sys/block/${device}/removable ]; then
if [ "$(cat /sys/block/${device}/removable)" = "0" ]; then
Expand All @@ -84,6 +85,26 @@ while true; do
fi
/bin/sleep 5
echo "Did not find an installation target device"
done
echo "Trying non-removable drives"
/bin/sleep 5
for device in 'hda' 'hdb' 'sda' 'sdb' 'sdc' 'sdd'; do
echo "checking device /dev/${device} for installation source..."
mount /dev/${device} /mnt
if [ -f /mnt/rootfs.img ] ; then
echo "Found Boot drive at /dev/${device}"
found="yes"
fi
umount /dev/${device}
if [ "$found" = "yes" ]; then
break;
fi
echo "/dev/${device} does not contain a rootfs"
done
if [ "$found" = "yes" ]; then
break;
fi

done
echo "will install to /dev/${device}"

Expand Down

0 comments on commit b5efc09

Please sign in to comment.