Commit graph

1980 commits

Author SHA1 Message Date
Dimitri John Ledkov
6ae0d67011 upstart-bridge: do not generate empty messages 2014-05-06 08:18:48 -04:00
Dimitri John Ledkov
5c487a0b82 upstart-bridge: don't bail on dummy terminals 2014-05-06 08:18:24 -04:00
Dimitri John Ledkov
850d808e47 upstart-bridge: use upstart private socket 2014-05-06 08:17:50 -04:00
Ray Strode
481388968d Revert "Add support for operation log messages"
This reverts commit 52b91176ba.
2014-04-21 11:18:19 -04:00
Ray Strode
aeb9ccbce8 Revert "upstart-bridge: change to use new register operations feature"
This reverts commit e9dced9181.
2014-04-21 11:18:16 -04:00
Pali Rohár
e9dced9181 upstart-bridge: change to use new register operations feature
https://bugs.freedesktop.org/show_bug.cgi?id=77389
2014-04-21 10:38:01 -04:00
Pali Rohár
52b91176ba Add support for operation log messages
This patch adding support for operation log messages and updating upstart
bridge code to use it. This is usefull for verbose log output (e.g daemon
starting, stopping).

Example:

 Register operation ssh:
 $ plymouth register-operation --operation-id=ssh --name='Starting OpenSSH server ssh'

 Set state of operation ssh to wait:
 $ plymouth update --operation-id=ssh --status="wait"
 Details plugin will show: 'Starting OpenSSH server ssh... [wait]'

 Set state of operation ssh to done:
 $ plymouth update --operation-id=ssh --status="done"
 Details plugin will show: 'Starting OpenSSH server ssh... [done]'

 Unregister operation ssh:
 $ plymouth unregister-operation --operation-id=ssh

https://bugs.freedesktop.org/show_bug.cgi?id=77389
2014-04-21 10:37:49 -04:00
Cosimo Cecchi
3db219d89b main: add a --no-boot-log commandline option
For systems that want to keep disk writes at the very minimum.

https://bugs.freedesktop.org/show_bug.cgi?id=76706
2014-03-27 16:15:41 -04:00
Cosimo Cecchi
a55f32a044 main: don't write an empty file when no_boot_log is set
https://bugs.freedesktop.org/show_bug.cgi?id=76706
2014-03-27 16:15:28 -04:00
Ray Strode
dec733032b Revert "systemd: create flag file to notify systemd that plymouth is around"
This reverts commit 8c267e9a3b.

I think this patch was accidentally pushed, since the commit date is
years older than the push date, and it seems to overlap in already
existing pid-file functionality.

If we actually do need this commit we can always add it back of course.
2014-03-27 16:11:50 -04:00
Lennart Poettering
8c267e9a3b systemd: create flag file to notify systemd that plymouth is around 2014-03-20 03:15:26 +01:00
Ray Strode
7e594f7255 seat: make sure to open terminal when adding text displays
If we have a pixel display, the renderer will handle opening the
associated terminal. but if we don't have a pixel display, something
needs to open the terminal.

This commit adds code to do that.
2014-03-06 14:42:16 -05:00
Ray Strode
6c9fddafb1 main: call update_display when splash is shown
we need to call update display any time a splash is shown,
because there may be a pending password request.

The code attempted to do this in show_splash, but did it before
the splash was assigned to running state, so function was a noop.

This commit moves it a little later in code after the splash is
properly assigned.
2014-03-06 10:07:05 -05:00
Ray Strode
5bfb903449 device-manager: be more tolerant of tty active console value
Some kernels mistakenly put tty1 instead of tty0 in the file,
so try to cope with them for maximium compatibility.
2014-03-03 18:02:26 -05:00
Ray Strode
4745c34478 device-manager: ignore udev if only console is serial console
Right now we use the heuristic, "more than one entry in
/sys/class/tty/console/active" to mean "has serial consoles".

We used to use the heuristic "file has more than tty0 in it".
The older heuristic is more accurate because a user may have
console=ttyS0 without console=tty0 on the kernel command line.
2014-03-03 18:02:25 -05:00
Ray Strode
97f02ee959 device-manager: defer /dev/fb compat processing until after coldplug
We never want to use a /dev/fb device if a DRM device will work instead
(since it supports multi-monitor, isn't a legacy interface, etc)

Unfortunately, right now plymouthd notices efifb at early start up,
see's there is no DRM device associated with it and chooses it for
the main display, which causes all sort of problems.

This commit defers using /dev/fb devices until after udev settles.
2014-03-03 17:31:27 -05:00
Ray Strode
f32df0332c device-manager: handle drm hotplug separately from /dev/fb
Right now, we piggyback off fb subsystem events to know whether or
not a drm device is hotplugged (since all drm devices have fb devices
for backward compat).

This commit makes drm and fb processing more independent, so we don't
rely on the compat device being available for drm hotplug to work..
2014-03-03 17:15:14 -05:00
Ray Strode
f57bb3dc1e client: support plymouth.debug on kernel command line
We used to use plymouth:debug to enable debugging in the
plymouth daemon, and changed it to plymouth.debug to be more
consistent with other users of the kernel command line.

We neglected to update the client to support the new format
though.  This commit does that.
2014-02-07 16:40:07 -05:00
Ray Strode
fea0252399 main: detach from keyboard on hide-splash
Currently plymouth stays in control of the terminal
after hide-splash.  This is wrong.  Once plymouth is
hidden, the terminal should be free to use for other
programs.

This commit makes sure we free up the terminal on
hide splash.
2014-02-06 15:22:54 -05:00
Ray Strode
1628320b09 main: don't nullify local_console_terminal in quit_splash
quit_splash gets called on hide-splash so nullify the terminal
will make it unavailable on later show-splash calls.
2014-02-06 14:42:40 -05:00
Ray Strode
b87a016cc8 main: cancel show_splash timeout on deactivate
This fixes a race/crash where plymouthd get deactivated
right before the show timer fires and it tries to
show itself after things have been torn down.
2014-02-05 15:12:17 -05:00
Ray Strode
e41af2d645 main: don't show splash from cancel_pending_delayed_show
It was a weird to show something in a function called "cancel..show"

Instead move the logic to the one caller that actually needed that
functionality (on_ask_for_password)
2014-02-05 15:09:13 -05:00
Ray Strode
f30df6c440 main: don't instruct terminal to ignore mode changes on deactivate
This prevents plymouthd from changing VTs if necessary.

http://bugs.freedesktop.org/show_bug.cgi?id=66824
2014-02-03 10:02:43 -05:00
Enrico Tagliavini
2d85c8d0a3 populate-initrd: install binaries to their configured location
If plymouth is configured --with-system-root-install=no then the
systemd unitd files will write the paths of plymouth and plymouthd
relative to /usr .  The script currently hardcodes installing them
to the initrd's /

This commit makes sure they get placed on the same part of the of
the initrd filesystem as systemd expects to find them.

https://bugs.freedesktop.org/show_bug.cgi?id=74174
2014-01-29 09:18:22 -05:00
Ray Strode
9b350e2f36 main: log when boot.log fails to open 2014-01-27 12:29:06 -05:00
Ray Strode
350764ae84 libply: add tracing statements to progress saving
We should at least report whether saving worked or failed.
2014-01-27 12:27:05 -05:00
Ray Strode
6814c3f742 main: add more debugging at quit time
There's a distinct lack of tracing statements around
the quit path, so flesh it out a little.
2014-01-27 12:24:20 -05:00
Ray Strode
9255a442e9 seat: proceed without renderer if type is AUTO and renderer fails
If a seat gets opened with a renderer type of AUTO, and the renderer
fails to open, then it's okay and expected to proceed without a
renderer (and just use the terminal). The code attempted to do this
but failed to nullify the seat->renderer object, so it ended up
going down the renderer-active code path.

This commit fixes that.
2014-01-24 15:14:19 -05:00
Ray Strode
382305e4a9 main: disable hotplug events and splash delay if details forced
There's no point in waiting for a graphics device if details are
forced, and we shouldn't ever delay showing details.  If details
are requested, we shouldn't be hiding them.
2014-01-24 14:34:36 -05:00
Ray Strode
785a0050c0 plymouthd: build with -rdynamic so built-in module works
The details plugin is "built in" to the plymouthd binary, so
it's always available even if the details module isn't installed
(say /usr isn't mounted yet or something)

Unfortunately, this feature isn't working because plymouthd isn't
built with -rdynamic (except for in my local CFLAGS).

This commit fixes the makefile goo accordingly.
2014-01-24 14:08:16 -05:00
Juan A. Suarez Romero
33b4e15358 main: create time directory if it doesn't exist
This makes sure there is a convenient place to write down boot duration.
2014-01-20 14:55:10 -05:00
Ray Strode
3d26454771 seat: always add text displays when opening seat
At the moment we add pixel displays if we can, or
text displays if we can't add pixel displays.

We need to always add text displays, otherwise, the
text splash won't work when explicitly configured by
the user.
2014-01-17 14:19:38 -05:00
Ray Strode
97100b1760 Revert "boot-server: defer show-splash reply until splash shown"
This reverts commit 126345af87.

If plymouth show-splash blocks until the splash screen is shown,
then systemd-ask-for-password-plymouth will block for 5 seconds
before asking for the password (which would have canceled the 5
second delay if it weren't for the dependency on plymouth-start.service)
2014-01-17 14:19:38 -05:00
Ray Strode
260bc5c73f main: don't rely on show_trigger to cancel show delay
We're going to be getting rid of show_trigger in a subsequent
commit, so this commit changes the code to use the is_shown
flag instead.
2014-01-17 14:19:38 -05:00
Ray Strode
17cfdb2825 main: print splash delay after loading it, not before
otherwise it will always say nan
2014-01-17 14:19:38 -05:00
Ray Strode
745c5fc3ab device-manager: add some better debugging
This commit just adds some more tracing statements,
that are useful for tracking down a bug.
2014-01-10 18:16:36 -05:00
Ray Strode
74bd75d4d3 device-manager: only pass scan a device passes all checks
Right now scan_graphics_devices returns true, if a device is found,
even if that device doesn't get used because it's not fully
initialized.
2014-01-10 18:12:57 -05:00
Ray Strode
4a9c021d28 main: load /usr/share/plymouth/plymouthd.defaults not plymouthd.conf
When i deduplicated code a few commits back, I made a cut-and-paste
error and used the wrong file name for distro policy
2014-01-10 17:47:52 -05:00
Ray Strode
293e37ed93 scripts: plymouth-update-initrd should call dracut -f with no args
dracut -f does the right thing on it's own, so we shouldn't try
to overspecify it
2014-01-10 15:55:20 -05:00
Ray Strode
84c1514582 defaults: enable a 5 second show delay by default
This way fast machines don't have to deal with a splash at all.
2014-01-10 14:18:53 -05:00
Ray Strode
6cc3d93888 main: introduce delay as a daemon option
Briefly, the two-step plugin would delay showing itself
for a few seconds (in case the machine boots quickly).

That got reverted, because i'm not convinced any longer
that doing it in the splash is the right level.  Also,
the implementation had various bugs causing the delay
to show up at the wrong time.

This commit makes it a daemon option instead.

This makes it easier to apply to all themes, and also makes it
so the admin can opt-out without changing themes.
2014-01-10 14:18:52 -05:00
Ray Strode
112b5eb1de main: clear is_shown state from hide_splash
Right now we clear is_shown after calling hide_splash in a couple
of places.  It makes more sense to clear this flag in one place,
in hide_splash, rather than duplicating code.
2014-01-10 14:18:07 -05:00
Ray Strode
19fe37f9d3 main: load default splash settings at start up
There's no reason to load them lazily, and when
we extend the functions to add a theme delay setting,
we're going to want to have the settings available as early as
possible.
2014-01-10 14:18:06 -05:00
Ray Strode
9ef8c46036 main: refactor theme loading code to reduce duplication
Right now we read /usr/share/plymouthd/plymouthd.defaults
and /etc/plymouth/plymouthd.conf to find the configured splash
screen.  The two functions that do this are basically copy-and-paste
of each other.

This commits splits some of the duplicated code out into a common
function for clarity.  Doing this also helps to facilitate adding
more configuration options, which we'll need to do in the future
to support a global start up delay.
2014-01-10 14:17:57 -05:00
Ray Strode
76d913fd84 main: don't skip asking for password if splash is coming up
If the client asks for a password and we don't have a splash
screen, we currently reply with a NOANSWER reply which makes
the client ask for the password instead.  This is so ask-for-password
requests that come up when plymouthd isn't controlling the tty can be
handled.

These days show-splash requests are asynchronous and so a splash screen
might not be around "right now" but will be around in the near
future. In these cases, we really want plymouth to handle asking for
the password, because it's going to take control of the tty imminently,
so the client won't able able to ask for the password (and, of course,
we'd rather the splash ask for the password anyway, since it's a better
user experience)

This commit checks if there's a looming show splash request.  If there
is, it avoids doing the NOANSWER reply and instead just sits tight
waiting for the splash to come up and the user to enter the password.
2014-01-10 14:16:36 -05:00
Ray Strode
126345af87 boot-server: defer show-splash reply until splash shown
Right now if a client calls show-splash it will return
immediately, before the splash screen may be necessarily
shown.

From this point on, init thinks the splash screen is up
and does things like asking for a password, which will
subsequently fail.

This commit makes 'plymouth show-splash' block until the
splash screen is actually shown.
2014-01-10 14:16:36 -05:00
Ray Strode
08aa5feab3 Revert "two-step: fix unlock screen" and "two-step: introduce delayed startup"
This reverts commits 540ae58fe0 and 17976ac538.

I want to implement the feature more generally, and the current
implementation has bugs when toggling to details and back.
2014-01-10 14:15:44 -05:00
Ray Strode
00cbac73f9 seat: activate keyboard when opening seat
During the recent device manager work, the code to open the keyboard
initially got dropped, making keyboard input not work.

This commit fixes that.
2014-01-10 14:07:45 -05:00
Ray Strode
ae149a6a99 device-manager: detach from event loop when getting freed
fixes a crash at shutdown
2014-01-10 13:35:48 -05:00
Cristian Rodríguez
f3d73e155b build-goo: link libudev with libply-splash-core instead of plymouthd
The libply-splash-core library provides functions for controlling the
input and output of the splash screen.

Recently it gained support for device enumeration from udev using the
libudev library. When that support was added, the linker and compiler
flags of the plymouthd binary were augmented, instead of the the
libply-splash-core library directly. That broke the build on some
systems.

This commit moves the linker and compiler flags to the correct place.
2013-12-14 19:29:42 -05:00