![]() Server : Apache/2.4.52 (Ubuntu) System : Linux webserver 6.8.0-49-generic #49~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Wed Nov 6 17:42:15 UTC 2 x86_64 User : www-data ( 33) PHP Version : 8.1.2-1ubuntu2.21 Disable Function : NONE Directory : /usr/share/initramfs-tools/hooks/ |
#!/bin/sh prereqs() { # linux-firmware should run last since other hooks might add additional firmware for _req in "${0%/*}"/* ; do _script="${_req##*/}" if [ "${_script}" != "${0##*/}" ] ; then echo "${_script}" fi done } case "${1}" in prereqs) prereqs exit 0 ;; esac . /usr/share/initramfs-tools/hook-functions prev_md5= find "${DESTDIR}"/lib/firmware ! -empty -type f -exec md5sum -b {} + | sort | uniq -w32 -dD | \ while IFS= read -r line ; do md5=$(printf '%s' "${line}" | cut -c -32) fw=$(printf '%s' "${line}" | cut -c 35-) if [ "${md5}" != "${prev_md5}" ] ; then tgt=${fw} else lnk=$(realpath --relative-to="${fw%/*}" "${tgt}") [ "${verbose}" = "y" ] && echo "Create firmware-link ${fw} -> ${lnk}" rm -f "${fw}" ln -s "${lnk}" "${fw}" fi prev_md5=${md5} done