Skip to content

Instantly share code, notes, and snippets.

@kescherCode
Created June 13, 2023 21:24
Show Gist options
  • Save kescherCode/5dcae413fac5f20d513815d5421349c6 to your computer and use it in GitHub Desktop.
Save kescherCode/5dcae413fac5f20d513815d5421349c6 to your computer and use it in GitHub Desktop.
Ownership info initcpio hook

How to add

  • Add hooks file as /etc/initcpio/hooks/owner
  • Add install file as /etc/initcpio/install/owner
  • Add owner to the HOOKS array right before any hook that requires user input, like encrypt, to ensure anyone wanting to find out your devices' ownership info by turning it on actually sees it
  • Run mkinitcpio -P as root
#!/usr/bin/ash
run_hook() {
msg ''
msg '==============================================================================================================================================================================================='
msg ''
msg ':: OWNERSHIP INFO'
msg 'This laptop belongs to kescher!'
msg 'If kescher is not around anywhere, contact them via:'
msg 'Email: jeremy@kescher.at'
msg 'Matrix: @kescher:kescher.at'
msg 'Fediverse: @kescher@catcatnya.com'
msg 'Telegram: @kescher'
msg ''
msg '==============================================================================================================================================================================================='
msg ''
}
#!/usr/bin/env bash
build() {
add_runscript
}
help() {
cat <<HELPEOF
This hook shows kescher as the owner during early userspace.
HELPEOF
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment