2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-09-06 02:08:25 +00:00

Merge branch 'lenovobuild2.14' of github.com:jjohnson42/xcat-core into lenovobuild2.14

This commit is contained in:
Jarrod Johnson
2019-01-18 13:29:09 -05:00

View File

@@ -138,6 +138,7 @@ if [ -z "$install_disk" ]; then
has_path=0
file_pre=""
disk_data=""
foundm2=0
# Check disks which had installed OS, or check all disks in /proc/partitions
for disk in $disks; do
@@ -159,6 +160,7 @@ if [ -z "$install_disk" ]; then
if [ "$disk_model" == "thinksystem m.2" ]; then
echo "$disk $disk_data" > "$tmpfile""$file_pre""firstchoicedisks"
echo "[get_install_disk] Add disk: $disk $disk_data into $file_pre firstchoicedisks"
foundm2=1
break # M.2 raid modules are the OS install targets
elif [ "$disk_driver" == "ahci" ]; then
echo "$disk $disk_data" >> "$tmpfile""$file_pre""firstchoicedisks"
@@ -221,6 +223,16 @@ if [ -z "$install_disk" ]; then
for file in $tmpfile*; do
rm $file;
done
if [ "$foundm2" == 0 -a -b /dev/md/Volume0_0 ] && grep SLES /etc/os-release; then
install_disk="/dev/md/Volume0"
echo "[get_install_disk]The install_disk is $install_disk by RSTe detection."
elif [ "$foundm2" == 0 -a -b /dev/md/Volume0_0 ]; then
install_disk="/dev/md/Volume0_0"
echo "[get_install_disk]The install_disk is $install_disk by RSTe detection."
elif [ "$foundm2" == 0 -a -b /dev/md/Volume0 ]; then
install_disk="/dev/md/Volume0"
echo "[get_install_disk]The install_disk is $install_disk by RSTe detection."
fi
fi
rm -rf $tmpdir;