Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#31155 - [initscripts] Change /etc/rc.d/functions wording, update hooks list.

Attached to Project: Arch Linux
Opened by Karol Błażewicz (karol) - Thursday, 16 August 2012, 15:30 GMT
Last edited by Tom Gundersen (tomegun) - Sunday, 04 November 2012, 16:21 GMT
Task Type Bug Report
Category Packages: Core
Status Closed
Assigned To Tom Gundersen (tomegun)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

The wording in /etc/rc.d/functions led me to believe the different hooks used in rc.* files are already configured somewhere but it seems they are just placeholders.

I didn't create a patch, because I'm not sure about the exact description that should accompany the sysinit_prefsck and sysinit_postfsck hooks and how to put other changes into words.

If you want this split into several bug reports, just say what should go where.

+===================

The bug concerns initscripts 2012.08.2-1, https://projects.archlinux.org/initscripts.git/tree/functions#n687 to be exact.

https://projects.archlinux.org/initscripts.git/tree/functions#n692 says "Define a hook function in a functions.d file". What is meant is the file should be placed _in_ /etc/rc.d/functions.d. I guess the exact filename doesn't matter.

https://projects.archlinux.org/initscripts.git/tree/functions#n700 says "Currently, the following hooks exist", but
1. The hooks are not defined anywhere so IMHO they don't actually exist.
2. The list is missing sysinit_prefsck and sysinit_postfsck from rc.sysinit.
3. sysinit_udevlaunched, single_udevlaunched, sysinit_udevsettled and single_udevsettled are nowhere to be found.
This task depends upon

Closed by  Tom Gundersen (tomegun)
Sunday, 04 November 2012, 16:21 GMT
Reason for closing:  Deferred
Additional comments about closing:  If anyone wants this fixed, post a patch to the projects ml. I'm not going to be working on this.
Comment by Olivier Brunel (jjacky) - Thursday, 16 August 2012, 16:04 GMT
1. hooks are defined when you have a "run_hook <hook_name>" in rc.sysinit or the likes, it needs nothing more.

3. those are all defined via function udevd_modprobe() in /etc/rc.d/functions
Comment by Karol Błażewicz (karol) - Thursday, 16 August 2012, 16:28 GMT
1. What does 'run_hook sysinit_start' do?
3. I've seen udevd_modprobe but the hooks list still needs updating.
Comment by Olivier Brunel (jjacky) - Thursday, 16 August 2012, 17:21 GMT
1. 'run_hook sysinit_start' will have all functions attached to that hook (sysinit_start) be executed. Scripts in /etc/rc.d/functions.d create functions, and attach them to a hook via "add_hook <hook_name> <function_name>"
Every function attached to sysinit_start that way will be triggered when 'run_hook sysinit_start' is called in rc.sysinit

That's why a hook is nothing more than a call to run_hook, it's there to allow external code (from scripts in /etc/rc.d/functions.d, either from user or other packages) to be ran at a certain time in the boot process.

3. Not sure what you mean, all those hooks are on the list already. What would you want changed?
Comment by Karol Błażewicz (karol) - Thursday, 16 August 2012, 17:33 GMT
1. It boils down to the meaning of the word 'exist' in the context of an empty /etc/rc.d/functions.d,
3. Grepping /etc shows /etc/rc.d/functions to be the only place that has the word 'sysinit_udevlaunched' in it. Sure, it makes sense to grep /etc/rc.sysinit for 'udev', but I'd rather have an explicit list.
Comment by Olivier Brunel (jjacky) - Thursday, 16 August 2012, 17:42 GMT
1. But a hook exists if, and as soon as, there's a call to run_hook with its name. That's all it takes or requires. It exists & can be used if so, and does not (and therefore cannot) if not. Whether or not it is actually being used (by scripts in /etc/rc.d/functions.d) is irrelevant.

3. That's just because those hooks are defined through a call to the udevd_modprobe function. But they exists just like all the others, hence why they're on the list of available hooks; So the list is correct (save for the missing sysinit_prefsck and sysinit_postfsck), nothing to be changed there.
Comment by Karol Błażewicz (karol) - Thursday, 16 August 2012, 18:12 GMT
.1 OK, you win: the hooks do exist, only the hook functions do not.

Loading...