feat(hooks): pak-scoped self-registering lifecycle hooks - #821
Open
dalexanco wants to merge 1 commit into
Open
Conversation
Adds pak-hooks.sh: Tools paks register for boot/pre-launch/post-launch/ pre-sleep/post-resume via a matching file next to their own launch.sh -- no arming, no HOOK_PHASE (filename says it), removing the pak removes its hooks. Only pre-launch.sh can veto. Cache rebuilds at boot, then only after a Tools pak (not a rom) exits. Game Tracker.pak now owns gametimectl start/stop/resume via its own hooks. Legacy run_hooks.sh/.hooks/ is kept but deprecated (logs when used).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Introduces
pak-hooks.sh: Tools paks register for lifecycle events (boot,pre-launch,post-launch,pre-sleep,post-resume) by dropping a matching file next to their ownlaunch.sh. Presence is the registration — no arming, and deleting the pak removes its hooks too. Onlypre-launch.shcan veto a launch.Pure core/infra PR, no Parental-control code — gives a future Parental.pak PR a stable mechanism to build on instead of bespoke
.hooks/copying, so it can land as an almost-independent pak.What changed
Game Tracker.paknow ownsgametimectlstart/stop/resume via its own hooks;api.c/nextui.cno longer call it directly.HOOK_PHASEenv var — the filename already says the phase.Tools/.run_hooks.sh/.hooks/kept but deprecated, logs a warning when used, so no third-party pak silently breaks.