FS#6989 - Make /etc/rc.d/functions source bootsplash functions (e.g., Splashy)
Attached to Project:
Arch Linux
Opened by Darwin Bautista (djclue917) - Tuesday, 24 April 2007, 08:43 GMT
Last edited by Aaron Griffin (phrakture) - Friday, 25 April 2008, 14:46 GMT
Opened by Darwin Bautista (djclue917) - Tuesday, 24 April 2007, 08:43 GMT
Last edited by Aaron Griffin (phrakture) - Friday, 25 April 2008, 14:46 GMT
|
Details
There has been some discussion going on about Splashy on
Arch.
http://bbs.archlinux.org/viewtopic.php?pid=245698 Basically, Splashy currently works by modifying /etc/rc.d/functions to source Splashy-specific and redefined Arch functions located in /etc/splashy/functions. In short, Splashy works through a hack, but a rather clean one. The only problem in this approach is that Splashy gets broken when the initscripts package is upgraded. iphitus then suggested that I file a feature request to make it easier for Splashy (and similar userspace bootsplash managers) to integrate with Arch. That being said, I propose that the code below be added to the end of the /etc/rc.d/functions file of the initscripts package: if [ -n ${BOOTSPLASH} -a -f /etc/${BOOTSPLASH}/functions ]; then . /etc/${BOOTSPLASH}/functions fi And that a new option be added in /etc/rc.conf: BOOTSPLASH="splashy" This is of course to allow other bootsplash managers that are similar to Splashy (if there are actually any) to be easily integrated into Arch. If that's not the case however, meaning that Splashy is one of a kind (the only userspace bootsplash manager that is actually usable), then just add the simplified and straightforward version of the code: if [ -f /etc/splashy/functions ]; then . /etc/splashy/functions fi In the same manner, the option, BOOTSPLASH, wouldn't be anymore required to be added to /etc/rc.conf. |
This task depends upon
Closed by Aaron Griffin (phrakture)
Friday, 25 April 2008, 14:46 GMT
Reason for closing: Fixed
Additional comments about closing: Solved by the inclusion of /etc/rc.d/functions.d/* sourcing
Friday, 25 April 2008, 14:46 GMT
Reason for closing: Fixed
Additional comments about closing: Solved by the inclusion of /etc/rc.d/functions.d/* sourcing
/etc/rc.d/functions.d/*
This is ugly but I can't think of a better way. /etc/functions.d/ is way to general, especially for functions that we intend only for initscripts
Another option is /etc/rc.functions.d/ which might be cleaner.
In fact, using a functions.d directory to simply override the message functions obsoletes the splash patch.
e.g. emit_stat (ex splash_wrapper) boot/init/exit/multi. But probably these could be implemented as empty functions in /etc/rc.d/functions and reimplemented properly in /etc/rc.d/functions.d/{splashy,fbsplash,bootprobe,etc}
We could just make a general dir for bash functions. I've got tonnes of reusable stuff in netcfg2 that would go there.
Something like /etc/functions.d/, /lib/functions/ and the init stuff could go in a subdir...eg: /etc/rc.functions/init/
Slightly bikesheddy, but the distinction is that i'm suggesting a general directory -- I know I'd use it and we could redistribute a tonne of useful scripts/functions.
scripts should NOT be in /etc - they should go in /usr/{lib,share}/archlinux/ or something.
The only reason these scripts are in /etc is that /etc is the ONLY dir of this magnitude that must be there at boot time when the initscripts run.
So the scripts in etc should ONLY be for initscripts and nothing else.
(Well, white lie: other stuff required at boot time, i.e. start_udev)
It seems like differentiating this much is just... well, wasting time. Right not a lot of distros keep initscript related things in /etc, so I don't think we have any problem with the current implementation besides the ugly naming of the dir.
I'm interested because I'd move netcfg2's internals into that directory too. eg /lib/functions/network
but yeah, *shrug* both work.