Re: Documentation for Order of HOOKS array in mkinitcpio.conf?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On Wednesday, 30 November 2022 09:20:39 EET David C. Rankin wrote:
> All,
> 
>    The wiki doesn't have ordering information for the HOOKS scripts, but the 
> comments in mkinitcpio.conf says Ordering in important and cautions against 
> changing from the default order. But, that doesn't account for additional 
> script added that are not in the default HOOKS example.
> 
>    I updated HOOKS from a much earlier version of mkinitcpio.conf to match the 
> new .pacnew file. There keyboard moved from after filesystems to just after 
> blocks. Is there a reference that explains where each script should be placed 
> aside for the note or two in the Common hooks section of the wiki?

The HOOKS section of the mkinitcpio wiki page somewhat explains how the
order works.

For build hooks, unless they add conflicting files, the order shouldn't
matter. The exception would be the systemd and autodetect hooks which do
more than just add files.

For runtime hooks in busybox based initramfs, the wiki lists the order of
the functions used in hooks: run_earlyhook, run_hook, run_latehook and
lastly run_cleanuphook.
To find out which hook uses which function requires reading its contents.
So if you have one hook with run_earlyhook and one with run_hook, their
order in the HOOKS array in mkinitcpio.conf does not matter. But if you
have two using run_hook, then it might.
For example, both the encrypt and keymap hooks use run_hook. Generally, most
people will want the keymap to be set before password input.

The keyboard and filesystems hooks you mentioned are only build hooks that
do not add conflicting files, so the order between them does not matter.

nl6720

Attachment: signature.asc
Description: This is a digitally signed message part.


[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux