tree: fix

Signed-off-by: AuxXxilium <info@auxxxilium.tech>
This commit is contained in:
AuxXxilium 2024-11-21 19:50:02 +01:00
parent 1fa3637052
commit 11e03839de
4 changed files with 32 additions and 26 deletions

View File

@ -71,8 +71,12 @@ jobs:
sudo timedatectl set-timezone "Europe/Berlin" sudo timedatectl set-timezone "Europe/Berlin"
sudo apt update sudo apt update
sudo apt install -y jq gawk cpio gettext libelf-dev qemu-utils busybox dialog curl sed sudo apt install -y locales busybox dialog gettext sed gawk jq curl
sudo snap install yq sudo apt install -y python-is-python3 python3-pip libelf-dev qemu-utils cpio xz-utils lz4 lzma bzip2 gzip zstd
# sudo snap install yq
if ! command -v yq &>/dev/null || ! yq --version 2>/dev/null | grep -q "v4."; then
sudo curl -kL https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 -o /usr/bin/yq && sudo chmod a+x /usr/bin/yq
fi
df -h df -h

View File

@ -220,28 +220,6 @@ done
CMDLINE_LINE=$(echo "${CMDLINE_LINE}" | sed 's/^ //') # Remove leading space CMDLINE_LINE=$(echo "${CMDLINE_LINE}" | sed 's/^ //') # Remove leading space
echo "${CMDLINE_LINE}" >"${PART1_PATH}/cmdline.yml" echo "${CMDLINE_LINE}" >"${PART1_PATH}/cmdline.yml"
function _bootwait() {
# Exec Bootwait to check SSH/Web connection
BOOTWAIT=5
w 2>/dev/null | awk '{print $1" "$2" "$4" "$5" "$6}' >WB
MSG=""
while test ${BOOTWAIT} -ge 0; do
MSG="\033[1;33mAccess SSH/Web will interrupt boot...\033[0m"
echo -en "\r${MSG}"
w 2>/dev/null | awk '{print $1" "$2" "$4" "$5" "$6}' >WC
if ! diff WB WC >/dev/null 2>&1; then
echo -en "\r\033[1;33mAccess SSH/Web detected and boot is interrupted.\033[0m\n"
rm -f WB WC
exit 0
fi
sleep 1
BOOTWAIT=$((BOOTWAIT - 1))
done
rm -f WB WC
echo -en "\r$(printf "%$((${#MSG} * 2))s" " ")\n"
return 0
}
# Boot # Boot
DIRECTBOOT="$(readConfigKey "directboot" "${USER_CONFIG_FILE}")" DIRECTBOOT="$(readConfigKey "directboot" "${USER_CONFIG_FILE}")"
if [ "${DIRECTBOOT}" = "true" ]; then if [ "${DIRECTBOOT}" = "true" ]; then
@ -308,7 +286,7 @@ elif [ "${DIRECTBOOT}" = "false" ]; then
[ -f "${TMP_PATH}/qrcode_boot.png" ] && echo | fbv -acufi "${TMP_PATH}/qrcode_boot.png" >/dev/null 2>/dev/null || true [ -f "${TMP_PATH}/qrcode_boot.png" ] && echo | fbv -acufi "${TMP_PATH}/qrcode_boot.png" >/dev/null 2>/dev/null || true
fi fi
for T in $(w 2>/dev/null | grep -v 'TTY' | awk '{print $2}'); do for T in $(busybox w 2>/dev/null | grep -v 'TTY' | awk '{print $2}'); do
if [ -w "/dev/${T}" ]; then if [ -w "/dev/${T}" ]; then
[ -n "${IPCON}" ] && echo -e "Use \033[1;34mhttp://${IPCON}:5000\033[0m or try \033[1;34mhttp://find.synology.com/ \033[0mto find DSM and proceed.\n\n\033[1;37mThis interface will not be operational. Wait a few minutes.\033[0m\n" >"/dev/${T}" 2>/dev/null || echo -e "Try \033[1;34mhttp://find.synology.com/ \033[0mto find DSM and proceed.\n\n\033[1;37mThis interface will not be operational. Wait a few minutes.\nNo IP found.\033[0m\n" >"/dev/${T}" 2>/dev/null [ -n "${IPCON}" ] && echo -e "Use \033[1;34mhttp://${IPCON}:5000\033[0m or try \033[1;34mhttp://find.synology.com/ \033[0mto find DSM and proceed.\n\n\033[1;37mThis interface will not be operational. Wait a few minutes.\033[0m\n" >"/dev/${T}" 2>/dev/null || echo -e "Try \033[1;34mhttp://find.synology.com/ \033[0mto find DSM and proceed.\n\n\033[1;37mThis interface will not be operational. Wait a few minutes.\nNo IP found.\033[0m\n" >"/dev/${T}" 2>/dev/null
fi fi

View File

@ -589,4 +589,28 @@ function __umountNewBlDisk() {
umount "${TMP_PATH}/sdX1" 2>/dev/null umount "${TMP_PATH}/sdX1" 2>/dev/null
umount "${TMP_PATH}/sdX2" 2>/dev/null umount "${TMP_PATH}/sdX2" 2>/dev/null
umount "${TMP_PATH}/sdX3" 2>/dev/null umount "${TMP_PATH}/sdX3" 2>/dev/null
}
###############################################################################
# bootwait SSH/Web
function _bootwait() {
# Exec Bootwait to check SSH/Web connection
BOOTWAIT=5
busybox w 2>/dev/null | awk '{print $1" "$2" "$4" "$5" "$6}' >WB
MSG=""
while test ${BOOTWAIT} -ge 0; do
MSG="\033[1;33mAccess SSH/Web will interrupt boot...\033[0m"
echo -en "\r${MSG}"
busybox w 2>/dev/null | awk '{print $1" "$2" "$4" "$5" "$6}' >WC
if ! diff WB WC >/dev/null 2>&1; then
echo -en "\r\033[1;33mAccess SSH/Web detected and boot is interrupted.\033[0m\n"
rm -f WB WC
exit 0
fi
sleep 1
BOOTWAIT=$((BOOTWAIT - 1))
done
rm -f WB WC
echo -en "\r$(printf "%$((${#MSG} * 2))s" " ")\n"
return 0
} }

View File

@ -106,7 +106,7 @@ for PE in ${PATCHES[@]}; do
echo "Patching with ${PF}" >>"${LOG_FILE}" echo "Patching with ${PF}" >>"${LOG_FILE}"
( (
cd "${RAMDISK_PATH}" cd "${RAMDISK_PATH}"
patch -p1 -i "${PF}" >>"${LOG_FILE}" 2>&1 # busybox patch and gun patch have different processing methods and parameters. busybox patch -p1 -i "${PF}" >>"${LOG_FILE}" 2>&1 # busybox patch and gun patch have different processing methods and parameters.
) )
RET=$? RET=$?
[ ${RET} -eq 0 ] && break [ ${RET} -eq 0 ] && break