403Webshell
Server IP : 202.155.9.38  /  Your IP : 216.73.217.134
Web Server : LiteSpeed
System : Linux srv733443859 5.15.0-179-generic #189-Ubuntu SMP Tue May 5 18:20:56 UTC 2026 x86_64
User : rabbi4843 ( 1044)
PHP Version : 8.1.34
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/share/initramfs-tools/hooks/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/share/initramfs-tools/hooks/linux-firmware
#!/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

test -d "${DESTDIR}"/lib/firmware || exit 0

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

Youez - 2016 - github.com/yon3zu
LinuXploit