In the event should_ignore_show_splash_calls () returns
true, we won't ever have a keyboard set. This commit
make sure that we don't try to use the keyboard if its
unavailable.
Right now, we put plymouth into a sort of degraded mode when we
find init=/anything on the kernel command line. This is so if
the user does init=/bin/sh to get fix their system, we don't
get in the way.
This breaks plymouth for things like init=/sbin/bootchartd and even
init=/sbin/init. We've previously had a plymouth.override-splash
kernel command line option to force plymouth on in those cases.
This commit flips things around a bit. Now init=/sbin/bootchartd
will work by default and there's a new option
plymouth.ignore-show-splash which forces things back into degraded
mode. We also will implicitly do the degraded mode for e.g.
init=/foo/barsh
Plymouth has historically used "plymouth:" to identify arguments destined
for it on the kernel command line. Most other things seem to the period
instead of colon, so this commit just makes plymouth conform.
For compatibility, we still support the old way.
Because of an apparent think-o in the script, if a custom theme
has a broken symlink in it, plymouth-populate-initrd would silently
stop processing files and ship an incomplete set of data files.
This commit changes "break" to "continue" so that broken symlinks
are ignored, which was probably the original intent.
It's important to make sure the theme name is properly
quoted when passed to the basename command. This
is because, if the theme name is empty we want the empty
string returned, not the suffix that would otherwise be
stripped off.
Some discussion here:
https://bugzilla.redhat.com/show_bug.cgi?id=606634
If the user has the details plugin configured, and the
system does plymouth quit --retain-splash, then their
may be a crash.
This is because the plugin event loop exit handler will called
after the plugin is destroyed. This commit makes sure
the exit handler is removed before the plugin is freed.
Before we defaulted to tty1, but some systems just
don't have tty1. Normally, those systems specify
an alternate console on the kernel command line,
but not always.
This commit tries to make things work in those cases
as well.
I'd like to find a more generic way to make this all
work.
epoll_wait was getting passed a pointer to 64 events,
but was only being told to use up to 8 of those events
at a time because it was using sizeof (pointer) for the
argument specifying the number of events instead of the
actual number of events.
plymouth has naïvely been treating the first available mode in
the connector object as the active mode. While this is true
most of the time, it doesn't hold true if the user overrides the
mode on the kernel command line.
This commit changes things to look up the actual active mode, and go
with that, which should help prevent flicker at start up in some cases.
This patch is based heavily on a patch from Forest Bond
<forest@alittletooquiet.net> here:
http://lists.freedesktop.org/archives/plymouth/2010-June/000369.html
and first mentioned in commit abfda7550a
Previously, we would store the mode of each head as pointer in
the array of modes on the connector object. Now we just store
the index into that array.
This is to make it clearer that we don't own the memory
associated with it directly, and that the memory associated with
it is automatically cleaned up when the connector is.
This also helps to highlight a problem mentioned by
Forest Bond <forest@alittletooquiet.net> here:
http://lists.freedesktop.org/archives/plymouth/2010-June/000369.html
Namely, we've been naïvely treating the first available mode in
the connector object as the active mode. While this is true
most of the time, it doesn't hold true if the user overrides the
mode on the kernel command line.
Adds an ignore-keystroke command. This does the same thing as the
ignore-keystroke option, but is migrated to a command. The option still exists
for compatibility.
Right now, we always assume the tty can be reopened when it
gets disconnected. This isn't always true. While plymouth
clearly won't function 100% properly without a tty, we shouldn't
blow an assertion.
Mandriva has cases where they need to drop to details mode
before /usr is mounted. /usr has the details splash plugin,
so this causes plymouth to explicitly exit.
This commit makes plymouth cope with that scenario slightly
better. It takes out the exit(1) call which was clearly bogus,
and also makes parts of the code handle a NULL splash better.
This is not a real fix though.
Ultimately, we should make "details" be built-in as a nice failsafe.
There's no reason we should need to load it off the disk as a plugin.
These are just a few more bits for themes to optionally
make use of. The throbber gets overlaid with the
progress animation, so they need to be concentric.
The header gets put on top.
We've historically used a expontial function for boot up,
to make it "feel" faster. This equation was invented by
Will Woods.
Making progress linear with boot up is also useful though.
This commit makes it configurable.
The cache file record milestones during boot, so we should
write it out:
1) only after the root filesystem is mounted
2) as soon as we're no longer going to get updates about boot
progress.
The throbber has a function for determining which frame
to show based on the current time. This function was:
ƒrame(t) = number_of_frames ∙ (⅟₂ sin(t) + ⅟₂)
Which basically oscillates between 0 and number_of_frames - 1,
over and over again. There are two problems with this function;
- after it runs through all the frames in order, it then procedes
to run through them backward.
- This function also starts in the middle of the set of throbber
frames.
These problems don't matter for spinfinity, but will look wrong for most
other themes.
The new function is this:
ƒrame(t) = number_of_frames ∙ (1⁄duration)(t mod duration)
This function solves both problems. At time 0 it uses frame 0, and
after the last frame it jumps back to the first frame.
The throbber variable has an is_stopped state
variable that decides whether or not draws happen.
It starts off false, and gets toggled when started.
Unfortunately, it never gets reset to false
after be stopped. This commit fixes that.
boot_buffer may be NULL if plymouthd failed to attach to the console
session (e.g. if booting without an initramfs so /dev/pts isn't mounted
yet). Handle this gracefully rather than segfaulting.
After changing the active vt during start up,
we get a signal when it finishes, because we're in
VT_PROCESS mode, so we don't need to explicitly block
waiting for it to finish.
During the quit path, though, we aren't in VT_PROCESS mode anymore,
won't get any signals, and still need to know that the VT switch
is finished before informing the client that the quit is
finished.
This commit forces ply_terminal_deactivate_vt to block until the
VT switch it initiates finishes.
The system now keeps a list of messages so they can be shown again when the
user flips themes or if the messages were passed before the splash was shown.
This also enables the splashes to show multiple messages (should they choose to
do so). There will later be a way of undisplaying a message.