代码拉取完成,页面将自动刷新
同步操作将从 src-anolis-os/rear 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
diff --git a/usr/share/rear/finalize/Linux-ppc64le/680_install_PPC_bootlist.sh b/usr/share/rear/finalize/Linux-ppc64le/680_install_PPC_bootlist.sh
index bf1db404..3a07580a 100644
--- a/usr/share/rear/finalize/Linux-ppc64le/680_install_PPC_bootlist.sh
+++ b/usr/share/rear/finalize/Linux-ppc64le/680_install_PPC_bootlist.sh
@@ -9,9 +9,12 @@ if grep -q "PowerNV" /proc/cpuinfo || grep -q "emulated by qemu" /proc/cpuinfo ;
fi
# Look for the PPC PReP Boot Partition.
-part=$( awk -F ' ' '/^part / {if ($6 ~ /prep/) {print $7}}' $LAYOUT_FILE )
+part_list=$( awk -F ' ' '/^part / {if ($6 ~ /prep/) {print $7}}' $LAYOUT_FILE )
-if [ -n "$part" ]; then
+# All the possible boot devices
+boot_list=()
+
+for part in $part_list ; do
LogPrint "PPC PReP Boot partition found: $part"
# Using $LAYOUT_DEPS file to find the disk device containing the partition.
@@ -29,14 +32,23 @@ if [ -n "$part" ]; then
# If yes, get the list of path which are part of the multipath device.
# Limit to the first 5 PATH (see #876)
if dmsetup ls --target multipath | grep -w ${bootdev#/dev/mapper/} >/dev/null 2>&1; then
- LogPrint "Limiting bootlist to 5 entries..."
- bootlist_path=$(dmsetup deps $bootdev -o devname | awk -F: '{gsub (" ",""); gsub("\\(","/dev/",$2) ; gsub("\\)"," ",$2) ; print $2}' | cut -d" " -f-5)
- LogPrint "Set LPAR bootlist to $bootlist_path"
- bootlist -m normal $bootlist_path
+ LogPrint "Limiting bootlist to 5 entries as a maximum..."
+ boot_list+=( $(dmsetup deps $bootdev -o devname | awk -F: '{gsub (" ",""); gsub("\\(","/dev/",$2) ; gsub("\\)"," ",$2) ; print $2}' | cut -d" " -f-5) )
else
# Single Path device found
- LogPrint "Set LPAR bootlist to $bootdev"
- bootlist -m normal $bootdev
+ boot_list+=( $bootdev )
fi
- LogIfError "Unable to set bootlist. You will have to start in SMS to set it up manually."
+done
+
+if [[ ${#boot_list[@]} -gt 5 ]]; then
+ LogPrint "Too many entries for bootlist command, limiting to first 5 entries..."
+ boot_list=( ${boot_list[@]:0:5} )
fi
+
+if [[ ${#boot_list[@]} -gt 0 ]]; then
+ LogPrint "Set LPAR bootlist to '${boot_list[*]}'"
+ bootlist -m normal "${boot_list[@]}"
+ LogPrintIfError "Unable to set bootlist. You will have to start in SMS to set it up manually."
+fi
+
+# vim: set et ts=4 sw=4:
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。