diff --git a/usr/bin/archboot-cpio.sh b/usr/bin/archboot-cpio.sh index bc00b4a0e..371d38081 100755 --- a/usr/bin/archboot-cpio.sh +++ b/usr/bin/archboot-cpio.sh @@ -29,7 +29,7 @@ fi _KERNELVERSION="$(_kver "${_KERNEL}")" _MOD_DIR="/lib/modules/${_KERNELVERSION}" [[ -d "${_MOD_DIR}" ]] || _abort "${_MOD_DIR} is not a valid kernel module directory!" -_ALL_MODS="$(fd -t f -u '.ko' . "${_MOD_DIR}" 2>"${_NO_LOG}")" +_ALL_MODS="$(fd -t f -u '.ko' "${_MOD_DIR}" 2>"${_NO_LOG}")" _BUILD_DIR="$(_init_rootfs "${_KERNELVERSION}" "${_TARGET_DIR}")" || exit 1 _ROOTFS="${_TARGET_DIR:-${_BUILD_DIR}/root}" if (( ${#_HOOKS[*]} == 0 )); then diff --git a/usr/bin/archboot-fw-check.sh b/usr/bin/archboot-fw-check.sh index 17a79d2ce..c1c264728 100755 --- a/usr/bin/archboot-fw-check.sh +++ b/usr/bin/archboot-fw-check.sh @@ -14,10 +14,10 @@ _usage () { exit 0 } [[ -z "${1}" || "${1}" != "run" ]] && _usage -for i in $(find "${_MODULE_DIR}" | grep '.ko.*'); do +for i in $(fd -u -t f '.ko' "${_MODULE_DIR}"); do modinfo -F firmware "${i}" >>modules.txt done -find "${_FIRMWARE}" | grep '.zst$' >firmware.txt +fd -u -t f 'zst' "${_FIRMWARE}" >firmware.txt cp firmware.txt firmware.orig.txt while read -r i; do sed -i -e "s#${i}##g" firmware.txt diff --git a/usr/bin/archboot-testsuite.sh b/usr/bin/archboot-testsuite.sh index 1991c47ec..1fd0921c3 100755 --- a/usr/bin/archboot-testsuite.sh +++ b/usr/bin/archboot-testsuite.sh @@ -44,7 +44,7 @@ for i in /usr/bin/*; do done _result bin-binary-error.txt _run_test "ldd on executables in /usr/lib" -for i in $(find /usr/lib -executable -type f | grep -v '.so$'); do +for i in $(fd -u -t x -E '*.so.*' -E '*.so' . /usr/lib); do if ldd "${i}" 2>"${_NO_LOG}" | grep -q 'not found'; then echo "${i}" >>lib-binary-error.txt ldd "${i}" | grep 'not found' >>lib-binary-error.txt @@ -54,7 +54,7 @@ done _result lib-binary-error.txt _run_test "ldd on /usr/lib" # ignore wrong reported libsystemd-shared by libsystemd-core -for i in $(find /usr/lib | grep '.so$'); do +for i in $(fd -u '.so' /usr/lib); do if ldd "${i}" 2>"${_NO_LOG}" | grep -v -E 'tree_sitter|libsystemd-shared' | grep -q 'not found'; then echo "${i}" >>lib-error.txt ldd "${i}" | grep 'not found' >>lib-error.txt @@ -94,7 +94,7 @@ _result license-error.txt echo -e "Starting none tracked files in \e[1m10\e[m seconds... \e[1;92mCTRL-C\e[m to stop now." read -r -t 10 _run_test "none tracked files in /usr/lib... this takes a while" -for i in $(find /usr/lib | grep -v -E '/modules|/udev|/gconv/gconv-modules.cache'); do +for i in $(fd -u -E '/modules/' -E ' /udev/' -E 'gconv-modules.cache' . /usr/lib); do pacman -Qo ${i} &>${_NO_LOG} || echo ${i} >> pacman-error.log done _result pacman-error.log