mirror of
https://github.com/AuxXxilium/arc.git
synced 2024-11-24 01:39:52 +07:00
arc: if nondt and portmap user selected, check for config values
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
This commit is contained in:
parent
90065f509f
commit
b04c40c23c
@ -1128,7 +1128,7 @@ function sysinfo() {
|
||||
elif [ "${REMAP}" == "remap" ]; then
|
||||
PORTMAP="$(readConfigKey "cmdline.sata_remap" "${USER_CONFIG_FILE}")"
|
||||
elif [ "${REMAP}" == "ahci" ]; then
|
||||
PORTMAP="$(readConfigKey "cmdline.ahci_remap" "${USER_CONFIG_FILE}")"
|
||||
AHCIPORTMAP="$(readConfigKey "cmdline.ahci_remap" "${USER_CONFIG_FILE}")"
|
||||
fi
|
||||
USERCMDLINEINFO="$(readConfigMap "cmdline" "${USER_CONFIG_FILE}")"
|
||||
USERSYNOINFO="$(readConfigMap "synoinfo" "${USER_CONFIG_FILE}")"
|
||||
@ -1230,8 +1230,14 @@ function sysinfo() {
|
||||
TEXT+="\n SataPortMap | DiskIdxMap: \Zb${PORTMAP} | ${DISKMAP}\Zn"
|
||||
elif [ "${REMAP}" == "remap" ]; then
|
||||
TEXT+="\n SataRemap: \Zb${PORTMAP}\Zn"
|
||||
elif [ "${REMAP}" == "ahci" ]; then
|
||||
TEXT+="\n AhciRemap: \Zb${AHCIPORTMAP}\Zn"
|
||||
elif [ "${REMAP}" == "user" ]; then
|
||||
TEXT+="\n PortMap: \Zb"User"\Zn"
|
||||
[ -n "${PORTMAP}" ] && TEXT+="\n SataPortmap: \Zb${PORTMAP}\Zn"
|
||||
[ -n "${DISKMAP}" ] && TEXT+="\n DiskIdxMap: \Zb${DISKMAP}\Zn"
|
||||
[ -n "${PORTREMAP}" ] && TEXT+="\n SataRemap: \Zb${PORTREMAP}\Zn"
|
||||
[ -n "${AHCIPORTREMAP}" ] && TEXT+="\n AhciRemap: \Zb${AHCIPORTREMAP}\Zn"
|
||||
fi
|
||||
if [ "${DT}" == "true" ]; then
|
||||
TEXT+="\n Hotplug: \Zb${HDDSORT}\Zn"
|
||||
|
@ -547,6 +547,13 @@ function arcSummary() {
|
||||
DISKMAP="$(readConfigKey "cmdline.DiskIdxMap" "${USER_CONFIG_FILE}")"
|
||||
elif [ "${REMAP}" == "remap" ]; then
|
||||
PORTREMAP="$(readConfigKey "cmdline.sata_remap" "${USER_CONFIG_FILE}")"
|
||||
elif [ "${REMAP}" == "ahci" ]; then
|
||||
AHCIPORTREMAP="$(readConfigKey "cmdline.ahci_remap" "${USER_CONFIG_FILE}")"
|
||||
else
|
||||
PORTMAP="$(readConfigKey "cmdline.SataPortMap" "${USER_CONFIG_FILE}")"
|
||||
DISKMAP="$(readConfigKey "cmdline.DiskIdxMap" "${USER_CONFIG_FILE}")"
|
||||
PORTREMAP="$(readConfigKey "cmdline.sata_remap" "${USER_CONFIG_FILE}")"
|
||||
AHCIPORTREMAP="$(readConfigKey "cmdline.ahci_remap" "${USER_CONFIG_FILE}")"
|
||||
fi
|
||||
DIRECTBOOT="$(readConfigKey "directboot" "${USER_CONFIG_FILE}")"
|
||||
KERNELLOAD="$(readConfigKey "kernelload" "${USER_CONFIG_FILE}")"
|
||||
@ -559,6 +566,12 @@ function arcSummary() {
|
||||
EMMCBOOT="$(readConfigKey "emmcboot" "${USER_CONFIG_FILE}")"
|
||||
OFFLINE="$(readConfigKey "arc.offline" "${USER_CONFIG_FILE}")"
|
||||
KERNEL="$(readConfigKey "kernel" "${USER_CONFIG_FILE}")"
|
||||
if [ "${DT}" == "false" ] && [ "${REMAP}" == "user" ]; then
|
||||
if [ -z "${PORTMAP}" ] && [ -z "${DISKMAP}"] && [ -z "${PORTREMAP}" ] && [ -z "${AHCIPORTREMAP}" ]; then
|
||||
dialog --backtitle "$(backtitle)" --title "Arc Error" \
|
||||
--msgbox "ERROR: You selected Portmap: User and didn't set any values. -> Can't build Loader." 5 80
|
||||
return 1
|
||||
fi
|
||||
# Print Summary
|
||||
SUMMARY="\Z4> DSM Information\Zn"
|
||||
SUMMARY+="\n>> DSM Model: \Zb${MODEL}\Zn"
|
||||
@ -573,6 +586,7 @@ function arcSummary() {
|
||||
[ -n "${PORTMAP}" ] && SUMMARY+="\n>> SataPortmap: \Zb${PORTMAP}\Zn"
|
||||
[ -n "${DISKMAP}" ] && SUMMARY+="\n>> DiskIdxMap: \Zb${DISKMAP}\Zn"
|
||||
[ -n "${PORTREMAP}" ] && SUMMARY+="\n>> SataRemap: \Zb${PORTREMAP}\Zn"
|
||||
[ -n "${AHCIPORTREMAP}" ] && SUMMARY+="\n>> AhciRemap: \Zb${AHCIPORTREMAP}\Zn"
|
||||
[ "${DT}" == "true" ] && SUMMARY+="\n>> Sort Drives: \Zb${HDDSORT}\Zn"
|
||||
SUMMARY+="\n>> Offline Mode: \Zb${OFFLINE}\Zn"
|
||||
SUMMARY+="\n>> Directboot: \Zb${DIRECTBOOT}\Zn"
|
||||
|
Loading…
Reference in New Issue
Block a user