Add support for hooks-cleanup

The pmOS initramfs will execute scripts in this dir, so let's add a way
to install them in the archive!
This commit is contained in:
Clayton Craft
2025-09-12 15:40:01 -07:00
parent bab4be1a89
commit 15c95f6b13
2 changed files with 4 additions and 1 deletions

View File

@@ -111,6 +111,8 @@ func main() {
hookfiles.New("/etc/mkinitfs/files"),
hookscripts.New("/usr/share/mkinitfs/hooks", "/hooks"),
hookscripts.New("/etc/mkinitfs/hooks", "/hooks"),
hookscripts.New("/usr/share/mkinitfs/hooks-cleanup", "/hooks-cleanup"),
hookscripts.New("/etc/mkinitfs/hooks-cleanup", "/hooks-cleanup"),
modules.New("/usr/share/mkinitfs/modules"),
modules.New("/etc/mkinitfs/modules"),
})

View File

@@ -134,7 +134,8 @@ create/manage. mkinitfs reads configuration from */usr/share/mkinitfs* first, an
skipped.
## /usr/share/mkinitfs/hooks, /etc/mkinitfs/hooks
## /usr/share/mkinitfs/hooks-extra*, /etc/mkinitfs/hooks-extra
## /usr/share/mkinitfs/hooks-cleanup, /etc/mkinitfs/hooks-cleanup
## /usr/share/mkinitfs/hooks-extra, /etc/mkinitfs/hooks-extra
Any files listed under these directories are copied as-is into the
relevant archives. Hooks are generally script files, but how they are