diff --git a/files/initrd/opt/arc/arc.sh b/files/initrd/opt/arc/arc.sh index 269a9551..c512d452 100755 --- a/files/initrd/opt/arc/arc.sh +++ b/files/initrd/opt/arc/arc.sh @@ -517,11 +517,11 @@ function arcPatch() { [ -z "${resp}" ] && return 1 if [ ${resp} -eq 1 ]; then # Read Arc Patch from File - SN=$(generateSerial "${MODEL}" "true") + SN=$(generateSerial "${MODEL}" "true" | tr '[:lower:]' '[:upper:]') writeConfigKey "arc.patch" "true" "${USER_CONFIG_FILE}" elif [ ${resp} -eq 2 ]; then # Generate random Serial - SN=$(generateSerial "${MODEL}" "false") + SN=$(generateSerial "${MODEL}" "false" | tr '[:lower:]' '[:upper:]') writeConfigKey "arc.patch" "false" "${USER_CONFIG_FILE}" elif [ ${resp} -eq 3 ]; then while true; do @@ -549,7 +549,7 @@ function arcPatch() { [ -z "${resp}" ] && return 1 if [ ${resp} -eq 1 ]; then # Generate random Serial - SN=$(generateSerial "${MODEL}" "false") + SN=$(generateSerial "${MODEL}" "false" | tr '[:lower:]' '[:upper:]') writeConfigKey "arc.patch" "false" "${USER_CONFIG_FILE}" elif [ ${resp} -eq 2 ]; then while true; do @@ -608,16 +608,23 @@ function arcSettings() { initConfigKey "addons.storagepanel" "" "${USER_CONFIG_FILE}" addonSelection [ $? -ne 0 ] && return 1 - # Check for CPU Frequency Scaling & Governor - if [ "${CPUFREQ}" == "true" ] && readConfigMap "addons" "${USER_CONFIG_FILE}" | grep -q "cpufreqscaling"; then - initConfigKey "addons.cpufreqscaling" "" "${USER_CONFIG_FILE}" - dialog --backtitle "$(backtitle)" --colors --title "CPU Frequency Scaling" \ - --infobox "Generating Governor Table..." 3 40 - governorSelection - [ $? -ne 0 ] && return 1 + fi + # Check for CPU Frequency Scaling & Governor + if [ "${AUTOMATED}" == "false" ] && [ "${CPUFREQ}" == "true" ] && readConfigMap "addons" "${USER_CONFIG_FILE}" | grep -q "cpufreqscaling"; then + dialog --backtitle "$(backtitle)" --colors --title "CPU Frequency Scaling" \ + --infobox "Generating Governor Table..." 3 40 + governorSelection + [ $? -ne 0 ] && return 1 + elif [ "${AUTOMATED}" == "true" ] && [ "${CPUFREQ}" == "true" ] && readConfigMap "addons" "${USER_CONFIG_FILE}" | grep -q "cpufreqscaling"; then + if [ "${PLATFORM}" == "epyc7002" ]; then + writeConfigKey "addons.cpufreqscaling" "schedutil" "${USER_CONFIG_FILE}" else - deleteConfigKey "addons.cpufreqscaling" "${USER_CONFIG_FILE}" + writeConfigKey "addons.cpufreqscaling" "ondemand" "${USER_CONFIG_FILE}" fi + else + deleteConfigKey "addons.cpufreqscaling" "${USER_CONFIG_FILE}" + fi + if [ "${AUTOMATED}" == "false" ]; then # Check for DT and HBA/Raid Controller if [ "${PLATFORM}" != "epyc7002" ]; then if [ "${DT}" == "true" ] && [ "${EXTERNALCONTROLLER}" == "true" ]; then diff --git a/files/initrd/opt/arc/include/network.sh b/files/initrd/opt/arc/include/network.sh index 900de9e9..a6e2abb5 100755 --- a/files/initrd/opt/arc/include/network.sh +++ b/files/initrd/opt/arc/include/network.sh @@ -6,13 +6,13 @@ function getnet() { NICPORTS="$(readConfigKey "${MODEL}.ports" "${S_FILE}" 2>/dev/null)" if [ "${ARCPATCH}" == "true" ]; then ETHN="$(echo ${ETHX} | wc -w)" - MACS=($(generateMacAddress "${MODEL}" "${ETHN}" "true")) + MACS=($(generateMacAddress "${MODEL}" "${ETHN}" "true" | tr '[:lower:]' '[:upper:]')) for I in $(seq 1 ${ETHN}); do writeConfigKey "eth$((${I} - 1))" "${MACS[$((${I} - 1))]}" "${USER_CONFIG_FILE}" done elif [ "${ARCPATCH}" == "false" ]; then ETHN="$(echo ${ETHX} | wc -w)" - MACS=($(generateMacAddress "${MODEL}" "${ETHN}" "false")) + MACS=($(generateMacAddress "${MODEL}" "${ETHN}" "false" | tr '[:lower:]' '[:upper:]')) for I in $(seq 1 ${ETHN}); do writeConfigKey "eth$((${I} - 1))" "${MACS[$((${I} - 1))]}" "${USER_CONFIG_FILE}" done @@ -28,7 +28,7 @@ function getnet() { MAC=$(cat "${TMP_PATH}/resp") [ -z "${MAC}" ] && MAC="$(readConfigKey "${ETH}" "${USER_CONFIG_FILE}")" [ -z "${MAC}" ] && MAC="$(cat /sys/class/net/${ETH}/address 2>/dev/null | sed 's/://g' | tr '[:upper:]' '[:lower:]')" - MAC="$(echo "${MAC}" | sed "s/:\|-\| //g" | tr '[:upper:]' '[:lower:]')" + MAC="$(echo "${MAC}" | sed "s/:\|-\| //g" | tr '[:lower:]' '[:upper:]')" if [ ${#MAC} -eq 12 ]; then writeConfigKey "${ETH}" "${MAC}" "${USER_CONFIG_FILE}" break