Skip to content

Commit

Permalink
tree: rewrite filelinks
Browse files Browse the repository at this point in the history
Signed-off-by: AuxXxilium <[email protected]>
  • Loading branch information
AuxXxilium committed May 22, 2024
1 parent d50c968 commit 2fc01c1
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 19 deletions.
2 changes: 0 additions & 2 deletions files/initrd/opt/arc/arc-functions.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@

[[ -z "${ARC_PATH}" || ! -d "${ARC_PATH}/include" ]] && ARC_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"

###############################################################################
# Permits user edit the user config
function editUserConfig() {
Expand Down
1 change: 1 addition & 0 deletions files/initrd/opt/arc/arc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
. ${ARC_PATH}/include/modules.sh
. ${ARC_PATH}/include/storage.sh
. ${ARC_PATH}/include/network.sh
. ${ARC_PATH}/include/update.sh
. ${ARC_PATH}/arc-functions.sh

[ -z "${LOADER_DISK}" ] && die "Loader Disk not found!"
Expand Down
1 change: 1 addition & 0 deletions files/initrd/opt/arc/boot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ set -e
[[ -z "${ARC_PATH}" || ! -d "${ARC_PATH}/include" ]] && ARC_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"

. ${ARC_PATH}/include/functions.sh
. ${ARC_PATH}/include/update.sh

# Get Loader Disk Bus
BUS=$(getBus "${LOADER_DISK}")
Expand Down
1 change: 0 additions & 1 deletion files/initrd/opt/arc/include/functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
. ${ARC_PATH}/include/consts.sh
. ${ARC_PATH}/include/configFile.sh
. ${ARC_PATH}/include/addons.sh
. ${ARC_PATH}/include/update.sh

###############################################################################
# Just show error message and dies
Expand Down
32 changes: 17 additions & 15 deletions files/initrd/opt/arc/include/update.sh
Original file line number Diff line number Diff line change
@@ -1,23 +1,9 @@

[[ -z "${ARC_PATH}" || ! -d "${ARC_PATH}/include" ]] && ARC_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"

CUSTOM="$(readConfigKey "arc.custom" "${USER_CONFIG_FILE}")"
PRODUCTVER="$(readConfigKey "productver" "${USER_CONFIG_FILE}")"
if [ -n "${PRODUCTVER}" ]; then
PLATFORM="$(readConfigKey "platform" "${USER_CONFIG_FILE}")"
KVER="$(readConfigKey "platforms.${PLATFORM}.productvers.[${PRODUCTVER}].kver" "${P_FILE}")"
# Modify KVER for Epyc7002
if [ "${PLATFORM}" = "epyc7002" ]; then
KVERP="${PRODUCTVER}-${KVER}"
else
KVERP="${KVER}"
fi
fi

###############################################################################
# Update Loader
function updateLoader() {
(
CUSTOM="$(readConfigKey "arc.custom" "${USER_CONFIG_FILE}")"
if [ -z "${1}" ]; then
# Check for new Version
idx=0
Expand Down Expand Up @@ -75,6 +61,7 @@ function updateLoader() {
# Update Addons
function updateAddons() {
(
CUSTOM="$(readConfigKey "arc.custom" "${USER_CONFIG_FILE}")"
if [ -z "${1}" ]; then
# Check for new Version
idx=0
Expand Down Expand Up @@ -128,6 +115,7 @@ function updateAddons() {
# Update Patches
function updatePatches() {
(
CUSTOM="$(readConfigKey "arc.custom" "${USER_CONFIG_FILE}")"
if [ -z "${1}" ]; then
# Check for new Version
idx=0
Expand Down Expand Up @@ -181,6 +169,7 @@ function updatePatches() {
# Update Modules
function updateModules() {
(
CUSTOM="$(readConfigKey "arc.custom" "${USER_CONFIG_FILE}")"
if [ -z "${1}" ]; then
# Check for new Version
idx=0
Expand Down Expand Up @@ -215,6 +204,17 @@ function updateModules() {
if [ -f "${TMP_PATH}/modules.zip" ]; then
rm -f "${TMP_PATH}/modules.zip"
# Rebuild modules if model/build is selected
PRODUCTVER="$(readConfigKey "productver" "${USER_CONFIG_FILE}")"
if [ -n "${PRODUCTVER}" ]; then
PLATFORM="$(readConfigKey "platform" "${USER_CONFIG_FILE}")"
KVER="$(readConfigKey "platforms.${PLATFORM}.productvers.[${PRODUCTVER}].kver" "${P_FILE}")"
# Modify KVER for Epyc7002
if [ "${PLATFORM}" = "epyc7002" ]; then
KVERP="${PRODUCTVER}-${KVER}"
else
KVERP="${KVER}"
fi
fi
if [ -n "${PLATFORM}" ] && [ -n "${KVERP}" ]; then
writeConfigKey "modules" "{}" "${USER_CONFIG_FILE}"
echo "Rebuilding Modules..."
Expand Down Expand Up @@ -242,6 +242,7 @@ function updateModules() {
# Update Configs
function updateConfigs() {
(
CUSTOM="$(readConfigKey "arc.custom" "${USER_CONFIG_FILE}")"
if [ -z "${1}" ]; then
# Check for new Version
idx=0
Expand Down Expand Up @@ -295,6 +296,7 @@ function updateConfigs() {
# Update LKMs
function updateLKMs() {
(
CUSTOM="$(readConfigKey "arc.custom" "${USER_CONFIG_FILE}")"
if [ -z "${1}" ]; then
# Check for new Version
idx=0
Expand Down
2 changes: 1 addition & 1 deletion files/initrd/opt/arc/update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
[[ -z "${ARC_PATH}" || ! -d "${ARC_PATH}/include" ]] && ARC_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"

. ${ARC_PATH}/include/functions.sh
. ${ARC_PATH}/include/addons.sh
. ${ARC_PATH}/include/modules.sh
. ${ARC_PATH}/include/network.sh
. ${ARC_PATH}/include/update.sh

[ -z "${LOADER_DISK}" ] && die "Loader Disk not found!"

Expand Down

0 comments on commit 2fc01c1

Please sign in to comment.