LINUX-RUN-HOOKS(1)

πŸ“¦
version 4.17ubuntu1 Β· 2 versions
, in debian bookworm, debian trixie, ubuntu resolute, ubuntu stonking

πŸ’– LINUX-RUN-HOOKS πŸ’–

okay so bestie, welcome to the linux-run-hooks page β€” she's a tiny little helper program, and her whole job is running package installation or removal hooks. let's get into it ✨


🌸 SYNOPSIS 🌸

linux-run-hooks image MAINT-SCRIPT KERNEL-VER IMAGE-PATH
                -- MAINT-PARAMS ...

linux-run-hooks headers MAINT-SCRIPT KERNEL-VER
                -- MAINT-PARAMS ...

like. look at her. two whole modes, two whole vibes πŸ’…


πŸ¦‹ DESCRPTION πŸ¦‹

(yes bestie, it's literally spelled like that, we are not touching it πŸ’€)

so linux-run-hooks is meant to be called from the maintainer scripts of Linux kernel image and headers packages. she doesn't do the heavy lifting herself β€” she calls up the run-parts command to execute all the hooks that have been installed into the appropriate subdirectories of /etc/kernel and /usr/share/kernel. no cap, that's the whole bit 🫢

the first argument is the package type, and it has to be either image or headers. pick one, she's not gonna guess 😌

the MAINT-SCRIPT argument has to be the name of the maintainer script, and the only four that are allowed are:

  • preinst
  • postinst
  • prerm
  • postrm

that's the list. those are the ones. periodt πŸ’…

the KERNEL-VER argument has to be the kernel version string β€” the one exactly as shown by uname -r, and the one that gets used in filenames. and listen, it is NOT the package version, okay?? not the same thing, don't get it twisted 😭

the IMAGE-PATH argument has to be the absolute filename of the kernel image. absolute. like from the root. don't hand her a lil relative path and expect main character energy πŸ™ˆ

and the MAINT-PARAMS arguments have to be the parameters that the maintainer script received. you just pass them straight on through, handoff style πŸŽ€

fr fr, this thing is a go-between β€” your maintainer script hands her stuff, she hands it to the hooks. keep every argument exactly what it says it is and everyone eats πŸ”₯

πŸ‘‘ AUTHOR πŸ‘‘

linux-run-hooks and this manual page were written by Ben Hutchings as part of the Debian linux-base package. iconic behaviour, honestly 🌈


and that's the whole page bestie!! πŸ’– this was the General Commands Manual entry for linux-run-hooks, dated 3 May 2025. go forth and run those hooks, you absolute legend πŸ¦‹βœ¨πŸŽ€

πŸ“¦ where this page comes from