Previous: , Up: Configuring Init   [Contents]


2.1.3 Init Hooks

Init hooks are for custom personal commands that the user may want to add to alter their boot. These can be used to load kernel modules, modify interfaces, and lot more. Those hooks are added to the ‘/etc/init’ directory with the hook name as the suffix. For example, a boot script will be placed as ‘/etc/init/my-hook.boot’. Currently, there are 4 hooks that the user can use.

early-boot

Run after pseudo-filesystems are mounted.

boot

Run before the boot stage is completed.

pre.shutdown

Run first when shutting down.

umount

Run just before filesystems are unmounted.

post.shutdown

Run just before the system is halted.