Compare commits
26 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
adba4d3421 | ||
|
|
8a1a314eb5 | ||
|
|
1026800376 | ||
|
|
a800767f0b | ||
|
|
6d07ffcaad | ||
|
|
e8efec928a | ||
|
|
af62a307e5 | ||
|
|
21630d6e33 | ||
|
|
738a16514d | ||
|
|
6debfe73b8 | ||
|
|
ce7ea49481 | ||
|
|
7a6197f04d | ||
|
|
491c15ec63 | ||
|
|
3b94661c90 | ||
|
|
e9463d990e | ||
|
|
90cc4520d8 | ||
|
|
4cf4efffbe | ||
|
|
071ae09e1b | ||
|
|
21b0f768f1 | ||
|
|
fe774756c0 | ||
|
|
6ab4bf3a5a | ||
|
|
0a7db3b4bb | ||
|
|
9849dc2ecc | ||
|
|
b82c840e04 | ||
|
|
d762884775 | ||
|
|
33e0149dbf |
4
.github/workflows/autobuild.yml
vendored
4
.github/workflows/autobuild.yml
vendored
@@ -104,7 +104,7 @@ jobs:
|
||||
|
||||
echo "Create Arc Image"
|
||||
IMAGE_FILE="arc.img"
|
||||
gzip -dc "grub.img.gz" >"${IMAGE_FILE}"
|
||||
gzip -dc "files/initrd/opt/arc/grub.img.gz" >"${IMAGE_FILE}"
|
||||
fdisk -l "${IMAGE_FILE}"
|
||||
|
||||
LOOPX=$(sudo losetup -f)
|
||||
@@ -185,7 +185,7 @@ jobs:
|
||||
|
||||
echo "Create Arc Image"
|
||||
IMAGE_FILE="arc.img"
|
||||
gzip -dc "grub.img.gz" >"${IMAGE_FILE}"
|
||||
gzip -dc "files/initrd/opt/arc/grub.img.gz" >"${IMAGE_FILE}"
|
||||
fdisk -l "${IMAGE_FILE}"
|
||||
|
||||
LOOPX=$(sudo losetup -f)
|
||||
|
||||
9
.github/workflows/build.yml
vendored
9
.github/workflows/build.yml
vendored
@@ -96,6 +96,7 @@ jobs:
|
||||
getTheme "files/p1/boot/grub"
|
||||
getBuildrootx "brx"
|
||||
getBuildroots "brs"
|
||||
cp -f "files/initrd/opt/arc/grub.img.gz" "grub.img.gz"
|
||||
|
||||
# Export Dependencies Version to env
|
||||
echo "ADDONTAG=${ADDONTAG}" >> $GITHUB_ENV
|
||||
@@ -130,7 +131,8 @@ jobs:
|
||||
|
||||
echo "Create Arc Image"
|
||||
IMAGE_FILE="arc.img"
|
||||
gzip -dc "grub.img.gz" >"${IMAGE_FILE}"
|
||||
cp -f "grub.img.gz" "files/initrd/opt/arc/grub.img.gz"
|
||||
gzip -dc "files/initrd/opt/arc/grub.img.gz" >"${IMAGE_FILE}"
|
||||
fdisk -l "${IMAGE_FILE}"
|
||||
|
||||
LOOPX=$(sudo losetup -f)
|
||||
@@ -184,6 +186,7 @@ jobs:
|
||||
zip -9 "arc-${{ env.ARC_VERSION }}-${{ env.ARC_BRANCH }}.vhd.zip" arc.vhd arc.vmc
|
||||
zip -9 "arc-${{ env.ARC_VERSION }}-${{ env.ARC_BRANCH }}.ova.zip" arc.ova
|
||||
(cd files && zip -r ../update-${{ env.ARC_VERSION }}-${{ env.ARC_BRANCH }}.zip ./p1 ./p3)
|
||||
sha256sum update-${{ env.ARC_VERSION }}-${{ env.ARC_BRANCH }}.zip >"update-${{ env.ARC_VERSION }}-${{ env.ARC_BRANCH }}.hash"
|
||||
fi
|
||||
|
||||
# Cleanup
|
||||
@@ -210,7 +213,8 @@ jobs:
|
||||
|
||||
echo "Create Arc Image"
|
||||
IMAGE_FILE="arc.img"
|
||||
gzip -dc "grub.img.gz" >"${IMAGE_FILE}"
|
||||
cp -f "grub.img.gz" "files/initrd/opt/arc/grub.img.gz"
|
||||
gzip -dc "files/initrd/opt/arc/grub.img.gz" >"${IMAGE_FILE}"
|
||||
fdisk -l "${IMAGE_FILE}"
|
||||
|
||||
LOOPX=$(sudo losetup -f)
|
||||
@@ -264,6 +268,7 @@ jobs:
|
||||
zip -9 "arc-${{ env.ARC_VERSION }}-${{ env.ARC_BRANCH }}.vhd.zip" arc.vhd arc.vmc
|
||||
zip -9 "arc-${{ env.ARC_VERSION }}-${{ env.ARC_BRANCH }}.ova.zip" arc.ova
|
||||
(cd files && zip -r ../update-${{ env.ARC_VERSION }}-${{ env.ARC_BRANCH }}.zip ./p1 ./p3)
|
||||
sha256sum update-${{ env.ARC_VERSION }}-${{ env.ARC_BRANCH }}.zip >"update-${{ env.ARC_VERSION }}-${{ env.ARC_BRANCH }}.hash"
|
||||
fi
|
||||
|
||||
# Publish a release if is a tag
|
||||
|
||||
3
.github/workflows/grub.yml
vendored
3
.github/workflows/grub.yml
vendored
@@ -39,6 +39,9 @@ jobs:
|
||||
if: success() && inputs.push == true
|
||||
run: |
|
||||
if [ -f "grub.img.gz" ]; then
|
||||
echo "Copy img ..."
|
||||
mv -f grub.img.gz files/initrd/opt/arc/grub.img.gz
|
||||
|
||||
echo "Git push ..."
|
||||
git pull
|
||||
status=$(git status -s | grep -E 'grub.img.gz' | awk '{printf " %s", $2}')
|
||||
|
||||
@@ -781,7 +781,7 @@ function backupMenu() {
|
||||
dialog --backtitle "$(backtitle)" --title "Restore Arc Config" \
|
||||
--aspect 18 --infobox "Restore successful! -> Reload Arc Init now" 5 50
|
||||
sleep 2
|
||||
./init.sh
|
||||
rm -f "${HOME}/.initialized" && exec init.sh
|
||||
;;
|
||||
2)
|
||||
DSMROOTS="$(findDSMRoot)"
|
||||
@@ -871,7 +871,7 @@ function backupMenu() {
|
||||
dialog --backtitle "$(backtitle)" --title "Online Restore" \
|
||||
--aspect 18 --infobox "Restore successful! -> Reload Arc Init now" 5 50
|
||||
sleep 2
|
||||
./init.sh
|
||||
rm -f "${HOME}/.initialized" && exec init.sh
|
||||
;;
|
||||
5)
|
||||
HWID="$(genHWID)"
|
||||
@@ -2148,7 +2148,7 @@ function rebootMenu() {
|
||||
elif [ "${REDEST}" = "network" ]; then
|
||||
clear
|
||||
/etc/init.d/S41dhcpcd restart
|
||||
./init.sh
|
||||
rm -f "${HOME}/.initialized" && exec init.sh
|
||||
else
|
||||
rebootTo ${REDEST}
|
||||
exit 0
|
||||
@@ -2408,22 +2408,28 @@ function genHardwareID() {
|
||||
HWID="$(genHWID)"
|
||||
while true; do
|
||||
USERID="$(curl -skL -m 10 "https://arc.auxxxilium.tech?hwid=${HWID}" 2>/dev/null)"
|
||||
if echo "${USERID}" | grep -vq "Hardware ID"; then
|
||||
dialog --backtitle "$(backtitle)" --title "HardwareID" \
|
||||
--msgbox "HardwareID: ${HWID}\nYour HardwareID is registered to UserID: ${USERID}!" 6 70
|
||||
if echo "${USERID}" | grep -qE '^[0-9]+$'; then
|
||||
writeConfigKey "arc.hardwareid" "${HWID}" "${USER_CONFIG_FILE}"
|
||||
writeConfigKey "arc.userid" "${USERID}" "${USER_CONFIG_FILE}"
|
||||
writeConfigKey "bootscreen.hwidinfo" "true" "${USER_CONFIG_FILE}"
|
||||
dialog --backtitle "$(backtitle)" --title "HardwareID" \
|
||||
--msgbox "HardwareID: ${HWID}\nYour HardwareID is registered to UserID: ${USERID}!" 6 70
|
||||
break
|
||||
else
|
||||
dialog --backtitle "$(backtitle)" --title "HardwareID" \
|
||||
--yes-label "Retry" --no-label "Cancel" --yesno "HardwareID: ${HWID}\nRegister your HardwareID on\nhttps://arc.auxxxilium.tech (Discord Account needed).\nPress Retry after you registered it." 8 60
|
||||
[ $? -ne 0 ] && break
|
||||
USERID=""
|
||||
writeConfigKey "arc.hardwareid" "" "${USER_CONFIG_FILE}"
|
||||
writeConfigKey "arc.userid" "" "${USER_CONFIG_FILE}"
|
||||
writeConfigKey "bootscreen.hwidinfo" "false" "${USER_CONFIG_FILE}"
|
||||
dialog --backtitle "$(backtitle)" --title "HardwareID" \
|
||||
--yes-label "Retry" --no-label "Cancel" --yesno "HardwareID: ${HWID}\nRegister your HardwareID at\nhttps://arc.auxxxilium.tech (Discord Account needed).\nPress Retry after you registered it." 8 60
|
||||
[ $? -ne 0 ] && break
|
||||
continue
|
||||
fi
|
||||
done
|
||||
CONFDONE="$(readConfigKey "arc.confdone" "${USER_CONFIG_FILE}")"
|
||||
if [ -n "${USERID}" ] && [ "${CONFDONE}" = "true"]; then
|
||||
ONLYPATCH="true" && arcPatch
|
||||
fi
|
||||
return
|
||||
}
|
||||
|
||||
@@ -2433,12 +2439,13 @@ function checkHardwareID() {
|
||||
HWID="$(genHWID)"
|
||||
USERID="$(curl -skL -m 10 "https://arc.auxxxilium.tech?hwid=${HWID}" 2>/dev/null)"
|
||||
[ ! -f "${S_FILE}.bak" ] && cp -f "${S_FILE}" "${S_FILE}.bak" 2>/dev/null || true
|
||||
if echo "${USERID}" | grep -vq "Hardware ID"; then
|
||||
if echo "${USERID}" | grep -qE '^[0-9]+$'; then
|
||||
if curl -skL -m 10 "https://arc.auxxxilium.tech?hwid=${HWID}&userid=${USERID}" -o "${S_FILE}" 2>/dev/null; then
|
||||
writeConfigKey "arc.hardwareid" "${HWID}" "${USER_CONFIG_FILE}"
|
||||
writeConfigKey "arc.userid" "${USERID}" "${USER_CONFIG_FILE}"
|
||||
writeConfigKey "bootscreen.hwidinfo" "true" "${USER_CONFIG_FILE}"
|
||||
else
|
||||
USERID=""
|
||||
writeConfigKey "arc.hardwareid" "" "${USER_CONFIG_FILE}"
|
||||
writeConfigKey "arc.userid" "" "${USER_CONFIG_FILE}"
|
||||
writeConfigKey "bootscreen.hwidinfo" "false" "${USER_CONFIG_FILE}"
|
||||
@@ -2451,7 +2458,7 @@ function checkHardwareID() {
|
||||
writeConfigKey "bootscreen.hwidinfo" "false" "${USER_CONFIG_FILE}"
|
||||
[ -f "${S_FILE}.bak" ] && mv -f "${S_FILE}.bak" "${S_FILE}" 2>/dev/null
|
||||
fi
|
||||
return 0
|
||||
return
|
||||
}
|
||||
|
||||
###############################################################################
|
||||
@@ -2463,25 +2470,31 @@ function bootScreen () {
|
||||
while IFS=': ' read -r KEY VALUE; do
|
||||
[ -n "${KEY}" ] && BOOTSCREENS["${KEY}"]="${VALUE}"
|
||||
done < <(readConfigMap "bootscreen" "${USER_CONFIG_FILE}")
|
||||
echo -e "dsminfo" >"${TMP_PATH}/bootscreen"
|
||||
echo -e "systeminfo" >>"${TMP_PATH}/bootscreen"
|
||||
echo -e "diskinfo" >>"${TMP_PATH}/bootscreen"
|
||||
echo -e "hwidinfo" >>"${TMP_PATH}/bootscreen"
|
||||
echo -e "dsmlogo" >>"${TMP_PATH}/bootscreen"
|
||||
while read -r BOOTSCREEN; do
|
||||
arrayExistItem "${BOOTSCREEN}" "${!BOOTSCREENS[@]}" && ACT="on" || ACT="off"
|
||||
echo -e "${BOOTSCREEN} \"${DESC}\" ${ACT}" >>"${TMP_PATH}/opts"
|
||||
done < <(cat "${TMP_PATH}/bootscreen")
|
||||
cat <<EOL >"${TMP_PATH}/bootscreen"
|
||||
dsminfo: DSM Information
|
||||
systeminfo: System Information
|
||||
diskinfo: Disk Information
|
||||
hwidinfo: HardwareID Information
|
||||
dsmlogo: DSM Logo
|
||||
EOL
|
||||
while IFS=': ' read -r BOOTSCREEN BOOTDESCRIPTION; do
|
||||
if [ "${BOOTSCREENS[${BOOTSCREEN}]}" = "true" ]; then
|
||||
ACT="on"
|
||||
else
|
||||
ACT="off"
|
||||
fi
|
||||
echo -e "${BOOTSCREEN} \"${BOOTDESCRIPTION}\" ${ACT}" >>"${TMP_PATH}/opts"
|
||||
done < "${TMP_PATH}/bootscreen"
|
||||
dialog --backtitle "$(backtitle)" --title "Bootscreen" --colors --aspect 18 \
|
||||
--checklist "Select Bootscreen Informations\Zn\nSelect with SPACE, Confirm with ENTER!" 0 0 0 \
|
||||
--file "${TMP_PATH}/opts" 2>"${TMP_PATH}/resp"
|
||||
[ $? -ne 0 ] && return 1
|
||||
resp=$(cat ${TMP_PATH}/resp)
|
||||
unset BOOTSCREENS
|
||||
declare -A BOOTSCREENS
|
||||
writeConfigKey "bootscreen" "{}" "${USER_CONFIG_FILE}"
|
||||
for BOOTSCREEN in ${resp}; do
|
||||
BOOTSCREENS["${BOOTSCREEN}"]=""
|
||||
writeConfigKey "bootscreen.\"${BOOTSCREEN}\"" "true" "${USER_CONFIG_FILE}"
|
||||
resp=$(cat "${TMP_PATH}/resp")
|
||||
for BOOTSCREEN in dsminfo systeminfo diskinfo hwidinfo dsmlogo; do
|
||||
if echo "${resp}" | grep -q "${BOOTSCREEN}"; then
|
||||
writeConfigKey "bootscreen.${BOOTSCREEN}" "true" "${USER_CONFIG_FILE}"
|
||||
else
|
||||
writeConfigKey "bootscreen.${BOOTSCREEN}" "false" "${USER_CONFIG_FILE}"
|
||||
fi
|
||||
done
|
||||
}
|
||||
@@ -167,7 +167,7 @@ function arcModel() {
|
||||
case ${RET} in
|
||||
0)
|
||||
resp=$(cat ${TMP_PATH}/resp)
|
||||
[ -z "${resp}" ] && return 1
|
||||
[ -z "${resp}" ] && return
|
||||
break
|
||||
;;
|
||||
1)
|
||||
@@ -180,7 +180,7 @@ function arcModel() {
|
||||
--title "Platform Info" --textbox "./informations/${PLATFORM}.yml" 70 80
|
||||
;;
|
||||
*)
|
||||
return 1
|
||||
return
|
||||
break
|
||||
;;
|
||||
esac
|
||||
@@ -242,9 +242,9 @@ function arcVersion() {
|
||||
dialog --clear --no-items --nocancel --title "DSM Version" --backtitle "$(backtitlep)" \
|
||||
--no-items --menu "Select DSM Version" 7 30 0 ${ITEMS} \
|
||||
2>"${TMP_PATH}/resp"
|
||||
[ $? -ne 0 ] && return 0
|
||||
[ $? -ne 0 ] && return
|
||||
resp=$(cat ${TMP_PATH}/resp)
|
||||
[ -z "${resp}" ] && return 1
|
||||
[ -z "${resp}" ] && return
|
||||
if [ "${PRODUCTVER}" != "${resp}" ]; then
|
||||
PRODUCTVER="${resp}"
|
||||
writeConfigKey "productver" "${PRODUCTVER}" "${USER_CONFIG_FILE}"
|
||||
@@ -386,7 +386,7 @@ function arcVersion() {
|
||||
writeConfigKey "arc.builddone" "false" "${USER_CONFIG_FILE}"
|
||||
BUILDDONE="$(readConfigKey "arc.builddone" "${USER_CONFIG_FILE}")"
|
||||
ONLYVERSION="false"
|
||||
return 0
|
||||
return
|
||||
else
|
||||
arcPatch
|
||||
fi
|
||||
@@ -396,7 +396,7 @@ function arcVersion() {
|
||||
writeConfigKey "arc.confdone" "false" "${USER_CONFIG_FILE}"
|
||||
CONFDONE="$(readConfigKey "arc.confdone" "${USER_CONFIG_FILE}")"
|
||||
sleep 5
|
||||
return 1
|
||||
return
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -478,7 +478,7 @@ function arcSettings() {
|
||||
--infobox "Generating Network Config..." 3 40
|
||||
sleep 2
|
||||
getnet
|
||||
[ $? -ne 0 ] && return 1
|
||||
[ $? -ne 0 ] && return
|
||||
fi
|
||||
if [ "${ONLYPATCH}" = "true" ]; then
|
||||
writeConfigKey "arc.builddone" "false" "${USER_CONFIG_FILE}"
|
||||
@@ -493,7 +493,7 @@ function arcSettings() {
|
||||
--infobox "Generating Storage Map..." 3 40
|
||||
sleep 2
|
||||
getmapSelection
|
||||
[ $? -ne 0 ] && return 1
|
||||
[ $? -ne 0 ] && return
|
||||
fi
|
||||
# Check for Custom Build
|
||||
if [ "${ARCMODE}" = "config" ]; then
|
||||
@@ -502,14 +502,14 @@ function arcSettings() {
|
||||
dialog --backtitle "$(backtitlep)" --colors --title "Addons" \
|
||||
--infobox "Loading Addons Table..." 3 40
|
||||
addonSelection
|
||||
[ $? -ne 0 ] && return 1
|
||||
[ $? -ne 0 ] && return
|
||||
fi
|
||||
# Check for CPU Frequency Scaling & Governor
|
||||
if [ "${ARCMODE}" = "config" ] && [ "${MACHINE}" = "Native" ] && readConfigMap "addons" "${USER_CONFIG_FILE}" | grep -q "cpufreqscaling"; then
|
||||
dialog --backtitle "$(backtitlep)" --colors --title "CPU Frequency Scaling" \
|
||||
--infobox "Generating Governor Table..." 3 40
|
||||
governorSelection
|
||||
[ $? -ne 0 ] && return 1
|
||||
[ $? -ne 0 ] && return
|
||||
elif [ "${ARCMODE}" = "automated" ] && [ "${MACHINE}" = "Native" ] && readConfigMap "addons" "${USER_CONFIG_FILE}" | grep -q "cpufreqscaling"; then
|
||||
[ "${PLATFORM}" = "epyc7002" ] && writeConfigKey "addons.cpufreqscaling" "schedutil" "${USER_CONFIG_FILE}" || writeConfigKey "addons.cpufreqscaling" "conservative" "${USER_CONFIG_FILE}"
|
||||
fi
|
||||
@@ -563,12 +563,12 @@ function arcSettings() {
|
||||
2 "No - I want to make changes" \
|
||||
2>"${TMP_PATH}/resp"
|
||||
resp=$(cat ${TMP_PATH}/resp)
|
||||
[ -z "${resp}" ] && return 1
|
||||
[ -z "${resp}" ] && return
|
||||
if [ ${resp} -eq 1 ]; then
|
||||
arcSummary
|
||||
elif [ ${resp} -eq 2 ]; then
|
||||
dialog --clear --no-items --backtitle "$(backtitle)"
|
||||
return 1
|
||||
return
|
||||
fi
|
||||
else
|
||||
# Build Loader
|
||||
@@ -702,7 +702,7 @@ function make() {
|
||||
writeConfigKey "arc.builddone" "false" "${USER_CONFIG_FILE}"
|
||||
BUILDDONE="$(readConfigKey "arc.builddone" "${USER_CONFIG_FILE}")"
|
||||
sleep 2
|
||||
return 1
|
||||
return
|
||||
fi
|
||||
if [ -f "${ORI_ZIMAGE_FILE}" ] && [ -f "${ORI_RDGZ_FILE}" ] && [ "${CONFDONE}" = "true" ] && [ -n "${PAT_URL}" ] && [ -n "${PAT_HASH}" ]; then
|
||||
(
|
||||
@@ -717,7 +717,7 @@ function make() {
|
||||
writeConfigKey "arc.builddone" "false" "${USER_CONFIG_FILE}"
|
||||
BUILDDONE="$(readConfigKey "arc.builddone" "${USER_CONFIG_FILE}")"
|
||||
sleep 2
|
||||
return 1
|
||||
return
|
||||
fi
|
||||
if [ -f "${ORI_ZIMAGE_FILE}" ] && [ -f "${ORI_RDGZ_FILE}" ] && [ -f "${MOD_ZIMAGE_FILE}" ] && [ -f "${MOD_RDGZ_FILE}" ]; then
|
||||
MODELID="$(echo ${MODEL} | sed 's/d$/D/; s/rp$/RP/; s/rp+/RP+/')"
|
||||
@@ -731,7 +731,7 @@ function make() {
|
||||
writeConfigKey "arc.builddone" "false" "${USER_CONFIG_FILE}"
|
||||
BUILDDONE="$(readConfigKey "arc.builddone" "${USER_CONFIG_FILE}")"
|
||||
sleep 2
|
||||
return 1
|
||||
return
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -754,11 +754,11 @@ function arcFinish() {
|
||||
2 "No - I want to make changes" \
|
||||
2>"${TMP_PATH}/resp"
|
||||
resp=$(cat ${TMP_PATH}/resp)
|
||||
[ -z "${resp}" ] && return 1
|
||||
[ -z "${resp}" ] && return
|
||||
if [ ${resp} -eq 1 ]; then
|
||||
boot
|
||||
elif [ ${resp} -eq 2 ]; then
|
||||
return 0
|
||||
return
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
@@ -833,7 +833,9 @@ elif [ "${ARCMODE}" = "config" ]; then
|
||||
echo "0 \"HardwareID for Arc Patch\" " >>"${TMP_PATH}/menu"
|
||||
fi
|
||||
echo "1 \"Choose Model \" " >>"${TMP_PATH}/menu"
|
||||
if [ "${CONFDONE}" = "true" ]; then
|
||||
if [ "${CONFDONE}" = "true" ] && [ -f "${MOD_ZIMAGE_FILE}" ] && [ -f "${MOD_RDGZ_FILE}" ]; then
|
||||
echo "2 \"Rebuild Loader \" " >>"${TMP_PATH}/menu"
|
||||
elif [ "${CONFDONE}" = "true" ]; then
|
||||
echo "2 \"Build Loader \" " >>"${TMP_PATH}/menu"
|
||||
fi
|
||||
if [ "${BUILDDONE}" = "true" ]; then
|
||||
@@ -1071,7 +1073,7 @@ elif [ "${ARCMODE}" = "config" ]; then
|
||||
;;
|
||||
c) ARCOFFLINE=$([ "${ARCOFFLINE}" = "true" ] && echo 'false' || echo 'true')
|
||||
writeConfigKey "arc.offline" "${ARCOFFLINE}" "${USER_CONFIG_FILE}"
|
||||
[ "${ARCOFFLINE}" = "false" ] && ./arc.sh
|
||||
[ "${ARCOFFLINE}" = "false" ] && exec arc.sh
|
||||
NEXT="c"
|
||||
;;
|
||||
D) staticIPMenu; NEXT="D" ;;
|
||||
@@ -1110,7 +1112,7 @@ else
|
||||
fi
|
||||
|
||||
# Inform user
|
||||
echo -e "Call \033[1;34marc\033[0m to configure Loader"
|
||||
echo -e "Call \033[1;34marc.sh\033[0m to configure Loader"
|
||||
echo
|
||||
echo -e "Web Terminal: \033[1;34mhttp://${IPCON}:${TTYDPORT:-7681}\033[0m"
|
||||
echo -e "Web Filemanager: \033[1;34mhttp://${IPCON}:${DUFSPORT:-7304}\033[0m"
|
||||
|
||||
@@ -43,13 +43,23 @@ function updateLoader() {
|
||||
dialog --gauge "Download Update: ${TAG}..." 14 72 4>&-
|
||||
} 4>&1
|
||||
if [ -f "${TMP_PATH}/update.zip" ] && [ $(ls -s "${TMP_PATH}/update.zip" | cut -d' ' -f1) -gt 300000 ]; then
|
||||
mkdir -p "${TMP_PATH}/update"
|
||||
dialog --backtitle "$(backtitle)" --title "Update Loader" \
|
||||
--infobox "Updating Loader..." 3 50
|
||||
if unzip -oq "${TMP_PATH}/update.zip" -d "${TMP_PATH}/update"; then
|
||||
cp -rf "${TMP_PATH}/update"/* "/mnt"
|
||||
rm -rf "${TMP_PATH}/update"
|
||||
rm -f "${TMP_PATH}/update.zip"
|
||||
HASHURL="https://github.com/AuxXxilium/arc/releases/download/${TAG}/update-${TAG}-${ARC_BRANCH}.hash"
|
||||
HASH="$(curl -skL "${HASHURL}" | awk '{print $1}')"
|
||||
if [ "${HASH}" != "$(sha256sum "${TMP_PATH}/update.zip" | awk '{print $1}')" ]; then
|
||||
dialog --backtitle "$(backtitle)" --title "Update Loader" --aspect 18 \
|
||||
--infobox "Update failed - Hash mismatch!\nTry again later." 0 0
|
||||
sleep 3
|
||||
exec reboot
|
||||
else
|
||||
rm -rf "/mnt/update"
|
||||
mkdir -p "${TMP_PATH}/update"
|
||||
dialog --backtitle "$(backtitle)" --title "Update Loader" \
|
||||
--infobox "Updating Loader..." 3 50
|
||||
if unzip -oq "${TMP_PATH}/update.zip" -d "${TMP_PATH}/update"; then
|
||||
cp -rf "${TMP_PATH}/update"/* "/mnt"
|
||||
rm -rf "${TMP_PATH}/update"
|
||||
rm -f "${TMP_PATH}/update.zip"
|
||||
fi
|
||||
fi
|
||||
if [ "$(cat "${PART1_PATH}/ARC-VERSION")" = "${TAG}" ]; then
|
||||
dialog --backtitle "$(backtitle)" --title "Update Loader" \
|
||||
@@ -485,6 +495,6 @@ function dependenciesUpdate() {
|
||||
BUILDDONE="$(readConfigKey "arc.builddone" "${USER_CONFIG_FILE}")"
|
||||
sleep 3
|
||||
clear
|
||||
./arc.sh
|
||||
exec arc.sh
|
||||
fi
|
||||
}
|
||||
@@ -5,26 +5,12 @@ set -e
|
||||
|
||||
. "${ARC_PATH}/include/functions.sh"
|
||||
|
||||
function loadArcOverlay() {
|
||||
echo -e "\033[1;34mLoading Arc Overlay...\033[0m"
|
||||
echo
|
||||
echo -e "Use \033[1;34mDisplay Output\033[0m or \033[1;34mhttp://${IPCON}:${TTYDPORT:-7681}\033[0m to configure Loader."
|
||||
|
||||
# Check memory and load Arc
|
||||
RAM=$(awk '/MemTotal:/ {printf "%.0f", $2 / 1024}' /proc/meminfo 2>/dev/null)
|
||||
if [ ${RAM} -le 3500 ]; then
|
||||
echo -e "\033[1;31mYou have less than 4GB of RAM, if errors occur in loader creation, please increase the amount of RAM.\033[0m\n\033[1;31mUse arc.sh to proceed. Not recommended!\033[0m"
|
||||
else
|
||||
./arc.sh
|
||||
fi
|
||||
}
|
||||
|
||||
# Get Loader Disk Bus
|
||||
[ -z "${LOADER_DISK}" ] && die "Loader Disk not found!"
|
||||
checkBootLoader || die "The loader is corrupted, please rewrite it!"
|
||||
|
||||
[ -f "${USER_CONFIG_FILE}" ] && sed -i "s/'/\"/g" "${USER_CONFIG_FILE}"
|
||||
[ -f "${HOME}/.initialized" ] && loadArcOverlay && exit 0 || true
|
||||
[ -f "${HOME}/.initialized" ] && exec arc.sh || true
|
||||
[ -f "${USER_CONFIG_FILE}" ] && sed -i "s/'/\"/g" "${USER_CONFIG_FILE}" >/dev/null 2>&1 || true
|
||||
|
||||
BUS=$(getBus "${LOADER_DISK}")
|
||||
EFI=$([ -d /sys/firmware/efi ] && echo 1 || echo 0)
|
||||
@@ -174,7 +160,7 @@ elif [ "${ARCMODE}" = "update" ]; then
|
||||
echo -e "\033[1;34mStarting Update Mode...\033[0m"
|
||||
elif [ "${BUILDDONE}" = "true" ] && [ "${ARCMODE}" = "dsm" ]; then
|
||||
echo -e "\033[1;34mStarting DSM Mode...\033[0m"
|
||||
./boot.sh && exit 0
|
||||
exec boot.sh && exit 0
|
||||
else
|
||||
echo -e "\033[1;34mStarting Config Mode...\033[0m"
|
||||
fi
|
||||
@@ -232,5 +218,15 @@ mkdir -p "${USER_UP_PATH}"
|
||||
touch "${HOME}/.initialized"
|
||||
|
||||
# Load Arc Overlay
|
||||
loadArcOverlay
|
||||
echo -e "\033[1;34mLoading Arc Overlay...\033[0m"
|
||||
echo
|
||||
echo -e "Use \033[1;34mDisplay Output\033[0m or \033[1;34mhttp://${IPCON}:${TTYDPORT:-7681}\033[0m to configure Loader."
|
||||
|
||||
# Check memory and load Arc
|
||||
RAM=$(awk '/MemTotal:/ {printf "%.0f", $2 / 1024}' /proc/meminfo 2>/dev/null)
|
||||
if [ ${RAM} -le 3500 ]; then
|
||||
echo -e "\033[1;31mYou have less than 4GB of RAM, if errors occur in loader creation, please increase the amount of RAM.\033[0m\n\033[1;31mUse arc.sh to proceed. Not recommended!\033[0m"
|
||||
else
|
||||
exec arc.sh
|
||||
fi
|
||||
exit 0
|
||||
@@ -1,7 +1,6 @@
|
||||
set default="boot"
|
||||
set timeout="5"
|
||||
set timeout_style="menu"
|
||||
set pager=1
|
||||
set vesa_mode=1
|
||||
set menu_color_normal=white/black
|
||||
set menu_color_highlight=white/red
|
||||
@@ -35,11 +34,11 @@ fi
|
||||
|
||||
if loadfont unicode; then
|
||||
insmod gfxterm
|
||||
set gfxmode=1024x768
|
||||
set gfxpayload=auto
|
||||
if [ "${grub_platform}" = "efi" ]; then
|
||||
set gfxmode=auto
|
||||
terminal_output --append gfxterm
|
||||
else
|
||||
set gfxmode=1024x768
|
||||
terminal_output gfxterm
|
||||
fi
|
||||
insmod gfxmenu
|
||||
@@ -63,7 +62,7 @@ function set_gfxpayload {
|
||||
fi
|
||||
}
|
||||
|
||||
set ARC_CMDLINE="earlyprintk earlycon=uart8250,io,0x3f8,115200n8 console=ttyS0,115200n8 root=/dev/ram rootwait intremap=off net.ifnames=0 panic=5 split_lock_detect=off pcie_aspm=off nox2apic nomodeset intel_pstate=disable"
|
||||
set ARC_CMDLINE="earlyprintk earlycon=uart8250,io,0x3f8,115200n8 console=ttyS0,115200n8 root=/dev/ram rootwait intremap=off net.ifnames=0 panic=5 split_lock_detect=off pcie_aspm=off intel_pstate=disable nox2apic nomodeset"
|
||||
|
||||
search --set=root --label "ARC3"
|
||||
if [ -s /zImage-dsm -a -s /initrd-dsm ]; then
|
||||
@@ -169,6 +168,11 @@ menuentry 'Start Memtest86+' --id memtest {
|
||||
linux ${prefix}/memtest
|
||||
}
|
||||
|
||||
menuentry 'Poweroff' --id poweroff {
|
||||
echo "System is powering off..."
|
||||
halt
|
||||
}
|
||||
|
||||
if [ ${vesa_mode} = 1 ]; then
|
||||
menuentry 'Change Vesa to Text Output' --id videomode {
|
||||
set vesa_mode=0
|
||||
|
||||
12
img-gen-n.sh
12
img-gen-n.sh
@@ -7,6 +7,10 @@ sudo git clean -fdx
|
||||
|
||||
. scripts/func.sh "${AUX_TOKEN}"
|
||||
|
||||
# Unmount Image File
|
||||
sudo umount "/tmp/p1" 2>/dev/null || true
|
||||
sudo umount "/tmp/p3" 2>/dev/null || true
|
||||
|
||||
# Get extractor, LKM, addons and Modules
|
||||
echo "Get Dependencies"
|
||||
getAddons "files/p3/addons"
|
||||
@@ -22,7 +26,7 @@ mkdir -p "brx"
|
||||
|
||||
# Sbase
|
||||
IMAGE_FILE="arc.img"
|
||||
gzip -dc "./grub.img.gz" >"${IMAGE_FILE}"
|
||||
gzip -dc "files/initrd/opt/arc/grub.img.gz" >"${IMAGE_FILE}"
|
||||
fdisk -l "${IMAGE_FILE}"
|
||||
|
||||
LOOPX=$(sudo losetup -f)
|
||||
@@ -49,8 +53,6 @@ if [ -f "brx/bzImage-arc" ] && [ -f "brx/initrd-arc" ]; then
|
||||
createArc
|
||||
repackInitrd "brx/initrd-arc" "files/initrd" "files/p3/initrd-arc"
|
||||
else
|
||||
sudo umount "/tmp/p1"
|
||||
sudo umount "/tmp/p3"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@@ -62,8 +64,8 @@ sync
|
||||
echo "Unmount image file"
|
||||
sudo umount "/tmp/p1"
|
||||
sudo umount "/tmp/p3"
|
||||
rmdir "/tmp/p1"
|
||||
rmdir "/tmp/p3"
|
||||
sudo rm -rf "/tmp/p1"
|
||||
sudo rm -rf "/tmp/p3"
|
||||
|
||||
sudo losetup --detach ${LOOPX}
|
||||
|
||||
|
||||
12
img-gen-s.sh
12
img-gen-s.sh
@@ -7,6 +7,10 @@ sudo git clean -fdx
|
||||
|
||||
. scripts/func.sh "${AUX_TOKEN}"
|
||||
|
||||
# Unmount Image File
|
||||
sudo umount "/tmp/p1" 2>/dev/null || true
|
||||
sudo umount "/tmp/p3" 2>/dev/null || true
|
||||
|
||||
# Get extractor, LKM, addons and Modules
|
||||
echo "Get Dependencies"
|
||||
getAddons "files/p3/addons"
|
||||
@@ -21,7 +25,7 @@ getOffline "files/p3/configs"
|
||||
|
||||
# Sbase
|
||||
IMAGE_FILE="arc.img"
|
||||
gzip -dc "./grub.img.gz" >"${IMAGE_FILE}"
|
||||
gzip -dc "files/initrd/opt/arc/grub.img.gz" >"${IMAGE_FILE}"
|
||||
fdisk -l "${IMAGE_FILE}"
|
||||
|
||||
LOOPX=$(sudo losetup -f)
|
||||
@@ -48,8 +52,6 @@ if [ -f "brs/bzImage-arc" ] && [ -f "brs/initrd-arc" ]; then
|
||||
createArc
|
||||
repackInitrd "brs/initrd-arc" "files/initrd" "files/p3/initrd-arc"
|
||||
else
|
||||
sudo umount "/tmp/p1"
|
||||
sudo umount "/tmp/p3"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@@ -61,8 +63,8 @@ sync
|
||||
echo "Unmount image file"
|
||||
sudo umount "/tmp/p1"
|
||||
sudo umount "/tmp/p3"
|
||||
rmdir "/tmp/p1"
|
||||
rmdir "/tmp/p3"
|
||||
sudo rm -rf "/tmp/p1"
|
||||
sudo rm -rf "/tmp/p3"
|
||||
|
||||
sudo losetup --detach ${LOOPX}
|
||||
|
||||
|
||||
@@ -503,9 +503,8 @@ function copyBuildroot() {
|
||||
|
||||
# create arc executable
|
||||
function createArc() {
|
||||
./scripts/make/makeself.sh "../arc/files/initrd/opt/arc" arc "Arc Loader" "./init.sh" --current --base64 --chown --threads=0 --quiet
|
||||
./scripts/make/makeself.sh --current --zstd --quiet "../arc/files/initrd/opt/arc" arc "Arc Loader" "./init.sh"
|
||||
rm -rf "../arc/files/initrd/opt/arc"
|
||||
mkdir -p "../arc/files/initrd/opt/arc"
|
||||
mv -f "arc" "../arc/files/initrd/opt/arc/"
|
||||
cp -f "./grub.img.gz" "files/initrd/opt/arc/grub.img.gz"
|
||||
}
|
||||
Reference in New Issue
Block a user