Improving DSM boot

This commit is contained in:
Fabio Belavenuto 2023-01-20 14:58:39 -03:00
parent 47f0b00ef3
commit db28065b21
6 changed files with 12 additions and 15 deletions

View File

@ -1 +1 @@
1.0-beta12
1.0-beta13

View File

@ -18,9 +18,6 @@ printf "\033[1;44m%*s\033[0m\n" ${COLUMNS} ""
TITLE="BOOTING..."
printf "\033[1;33m%*s\033[0m\n" $(((${#TITLE}+${COLUMNS})/2)) "${TITLE}"
history -w
sync
# Check if DSM zImage changed, patch it if necessary
ZIMAGE_HASH="`readConfigKey "zimage-hash" "${USER_CONFIG_FILE}"`"
if [ "`sha256sum "${ORI_ZIMAGE_FILE}" | awk '{print$1}'`" != "${ZIMAGE_HASH}" ]; then
@ -29,7 +26,7 @@ if [ "`sha256sum "${ORI_ZIMAGE_FILE}" | awk '{print$1}'`" != "${ZIMAGE_HASH}" ];
if [ $? -ne 0 ]; then
dialog --backtitle "`backtitle`" --title "Error" \
--msgbox "zImage not patched:\n`<"${LOG_FILE}"`" 12 70
return 1
exit 1
fi
fi
@ -41,7 +38,7 @@ if [ "`sha256sum "${ORI_RDGZ_FILE}" | awk '{print$1}'`" != "${RAMDISK_HASH}" ];
if [ $? -ne 0 ]; then
dialog --backtitle "`backtitle`" --title "Error" \
--msgbox "Ramdisk not patched:\n`<"${LOG_FILE}"`" 12 70
return 1
exit 1
fi
fi
@ -142,8 +139,7 @@ if [ "${DIRECT}" = "true" ]; then
echo -e "\033[1;33mReboot to boot directly in DSM\033[0m"
grub-editenv ${GRUB_PATH}/grubenv set next_entry="direct"
reboot
sleep 100
exit
exit 0
fi
echo -e "\033[1;37mLoading DSM kernel...\033[0m"
@ -156,4 +152,4 @@ else
fi
echo -e "\033[1;37mBooting...\033[0m"
poweroff
while true; do sleep 1; done # infinity loop
exit 0

View File

@ -1,5 +1,5 @@
ARPL_VERSION="1.0-beta12"
ARPL_VERSION="1.0-beta13"
# Define paths
TMP_PATH="/tmp"

View File

@ -158,7 +158,9 @@ elif grep -q "IWANTTOCHANGETHECONFIG" /proc/cmdline; then
fi
# If is to boot automatically, do it
[ ${BOOT} -eq 1 ] && boot.sh
if [ ${BOOT} -eq 1 ]; then
boot.sh && exit 0
fi
# Wait for an IP
COUNT=0

View File

@ -1162,7 +1162,7 @@ function updateMenu() {
if [ "x$1" = "xb" -a -n "${MODEL}" -a -n "${BUILD}" -a loaderIsConfigured ]; then
make
boot
boot && exit 0 || sleep 5
fi
# Main loop
NEXT="m"
@ -1206,7 +1206,7 @@ while true; do
i) synoinfoMenu; NEXT="v" ;;
v) advancedMenu; NEXT="d" ;;
d) make; NEXT="b" ;;
b) boot ;;
b) boot && exit 0 || sleep 5 ;;
k) keymapMenu ;;
c) dialog --backtitle "`backtitle`" --title "Cleaning" --aspect 18 \
--prgbox "rm -rfv \"${CACHE_PATH}/dl\"" 0 0 ;;
@ -1216,4 +1216,3 @@ while true; do
done
clear
echo -e "Call \033[1;32mmenu.sh\033[0m to return to menu"

View File

@ -1 +1 @@
1.0-beta12
1.0-beta13