This commit is contained in:
Valeria Fadeeva 2023-11-04 16:02:39 +05:00
parent 5e8f71ace9
commit 51e439c169
3 changed files with 53 additions and 0 deletions

15
.github/FUNDING.yml vendored Executable file
View File

@ -0,0 +1,15 @@
# These are supported funding model platforms
#github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
#patreon: # Replace with a single Patreon username
#open_collective: # Replace with a single Open Collective username
#ko_fi: # Replace with a single Ko-fi username
#tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
#community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
#liberapay: # Replace with a single Liberapay username
#issuehunt: # Replace with a single IssueHunt username
#otechie: # Replace with a single Otechie username
#custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
#github: [Valeria-Fadeeva]
custom: ["https://www.tinkoff.ru/rm/fadeeva.valeriya96/9bLRi79066", "https://yoomoney.ru/to/4100115921160758", "https://qiwi.com/n/VALERIAFADEEVA", "valeria.fadeeva.me"]

3
push.sh Executable file
View File

@ -0,0 +1,3 @@
#!/bin/bash
git add . && git commit -m "Update" && git push

35
src/usr/bin/dracut-rebuild Executable file
View File

@ -0,0 +1,35 @@
#!/usr/bin/env bash
#
# Rebuild all the initrds using dracut
# This finds the best token for systemd-boot
find_token() {
if [[ -s /etc/kernel/entry-token ]] ; then
cat /etc/kernel/entry-token
elif [[ -s /etc/machine-id ]] ; then
cat /etc/machine-id
elif [[ $(grep "^IMAGE_ID=" /etc/os-release) ]] ; then
grep "^IMAGE_ID=" /etc/os-release | awk -F"=" '{print $2}'
elif [[ $(grep "^ID=" /etc/os-release) ]] ; then
grep "^ID=" /etc/os-release | awk -F"=" '{print $2}'
fi
}
[[ -f /etc/kernel-install-for-dracut.conf ]] && source /etc/kernel-install-for-dracut.conf
ESP=$(bootctl --print-esp-path)
TOKEN=$(find_token)
while read -r pkgbase; do
kernelversion=$(basename "${pkgbase%/pkgbase}")
kernelname=$(cat "${pkgbase}")
INITRD_PATH="${ESP}/${TOKEN}/${kernelversion}"
if [[ ! -d "$INITRD_PATH" ]] ; then
echo 'Failed to build initrds, use "sudo reinstall-kernels" instead' 1>&2
exit 1
fi
echo "Running dracut for ${kernelname}-${kernelversion}"
[[ ${DRACUT_QUIET} == "true" ]] && DRACUT_EXTRA_PARAMS=" --quiet"
dracut --force --hostonly --no-hostonly-cmdline${DRACUT_EXTRA_PARAMS} "${INITRD_PATH}/initrd" "${kernelversion}"
[[ ${NO_DRACUT_FALLBACK} != "true" ]] && dracut --force --no-hostonly${DRACUT_EXTRA_PARAMS} "${INITRD_PATH}/initrd-fallback" "${kernelversion}"
done < <(find /usr/lib/modules -maxdepth 2 -type f -name pkgbase)