Commit graph

1820 commits

Author SHA1 Message Date
Frederic Crozat
53f6b44e11 systemd units: halt/reboot/kexec/power systemd unit have changed names
Ensure we use the new 'systemd-' prefixed names now.
2013-07-29 17:41:30 +02:00
Colin Walters
de4f23a868 systemd units: Replace prefdm.service with display-manager.service
The former is dead, the latter is the new name.  See:

http://cgit.freedesktop.org/systemd/systemd/commit/?id=b2c9cbafb8b1a2742978e1faf37fbb3cf4fb5d44
https://fedoraproject.org/wiki/Features/DisplayManagerRework
2013-07-19 10:25:20 -04:00
Ray Strode
7fd7fd1a82 key-file: ignore leading spaces and blank lines
leading spaces and blank lines currently cause parse errors.
This commit fixes the parser to be more lenient.

https://bugs.freedesktop.org/show_bug.cgi?id=67006
2013-07-17 15:07:43 -04:00
Steve Langasek
cb2595ac56 Miscellaneous fixes for compiler warnings
Fix various warnings turned up with -Wall.  After fixing these remaining
issues, plymouth now builds successfully with gcc 4.8 using
"-Werror -Wno-error=unused-result -Wno-error=sign-compare".
2013-06-30 14:44:47 -04:00
Steve Langasek
88c30d233f script: include head with prototype of ply_get_timestamp()
ply_get_timestamp() returns a double, but the compiler assumes it will
return an int if ply-utils.h isn't #included.  This disparity between
what gets returned and what the compiler is expecting will be returned
causes astonishing knock-on effects (the label plugin fails to display
any text). See:

https://bugs.launchpad.net/ubuntu/+source/plymouth/+bug/1187318

and

http://lists.freedesktop.org/archives/plymouth/2013-June/000733.html
2013-06-28 14:29:40 -04:00
Frederic Crozat
0d610f91e2 main: redirect standard io to /dev/null
do not redirect standard io to console tty anymore, it can cause issue
with Xorg grabbing tty
(https://bugzilla.novell.com/show_bug.cgi?id=811185).

Initial patch by Ray Strode
2013-06-11 16:37:16 +02:00
Frederic Crozat
cf99635f16 systemd: make sure to ignore all exit codes in ExecStartPost 2013-06-10 13:19:48 -04:00
Ray Strode
bb92122a92 terminal-session: don't close ptmx unless it's opened
This prevents a scary close(-1) in straces.
2013-06-10 11:11:56 -04:00
Ray Strode
41560df672 terminal-session: plug /dev/console fd leak
When we stop redirecting console messages, we temporarly open
/dev/console.  We don't ever close it.

This commit fixes that.
2013-06-10 10:44:56 -04:00
Ray Strode
5784c8ff0c logger: don't close already logger if already closed
This prevents close(-1) from showing up in strace
2013-06-06 10:08:55 -04:00
Jeff Mahoney
f2b74ce9c0 plymouth: Add line numbers to tracing output
The plymouth tracing output lists the function but there are many
 cases in which the same message is issued from multiple places in the same
 function, which makes debugging more difficult. This patch adds the line
 number to the output to uniquely identify each site.

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: Cristian Rodríguez <crrodriguez@opensuse.org>
2013-04-16 08:48:40 -04:00
Cristian Rodríguez
e83a754b91 Lookup the location of udevadm
It is not always in /bin , but /usr/...
2013-04-16 08:48:05 -04:00
Cristian Rodríguez
de67b2d021 configure: Use pkgconfig to determine the systemd unit dir location
Don't assume it's in /lib/systemd/system
2013-04-14 12:08:55 -04:00
Cristian Rodríguez
8f373680dd systemd: Look up systemd-tty-ask-password-agent location
Don't assume it's in /bin.
2013-04-14 12:06:38 -04:00
Dave Airlie
32ae2addfb drm: inform kernel about recently flushed areas
Some drivers (QXL in particular) require to be notified when a part
of the mapped frame buffer memory is changed.

This commit adds a drmModeDirtyFB call after flushing changes to the
frame buffer to accomplish that.
2013-03-26 12:18:10 -04:00
Ray Strode
5f3ebd4f6d systemd: add Wants: systemd-vconsole-setup.service
Harald says we need it.
2013-03-26 11:41:55 -04:00
Ray Strode
8be792a5a7 systemd: add plymouth-start.service to initrd-switch-root.target
<haraldh> halfline, can you add plymouth-start.service to
plymouth-populate-initrd ??
<halfline> haraldh: sure, can you give me details on the bug its fixing?
<haraldh> except, if you put yourself out of the plymouth cgroup
<haraldh> and the "@" in argv[0][0]
<haraldh> better put plymouth-start.service in the
initrd-switch-root.target
<haraldh> easier
<halfline> well we already do the "@" in argv[0][0]
<halfline> and we already put KillMode=none SendSIGKILL=no in the
service file
<halfline> but will add the change
<haraldh> hmm, ok
2013-03-13 10:24:14 -04:00
Ray Strode
e2b0c7c772 animation,throbber: go back to frame dropping
Right now we figure out which animation frame to use
based on a static counter variable.  Since it's static
instead of per-object, if there are multiple instances
it ends up counting up too fast.

We could:
1) make it per-object state
2) drop it and use the ifdef'd out alternative implementation
that potentially drops frames if the machine is sluggish

This commit chooses 2, but we may end up going to one if the
frame dropping turns out to be problematic.

Based on deductive work from Kevin Murphy.
2013-03-12 12:01:21 -04:00
Ray Strode
054d29019d main: use correct cache file
Now that we allow switching into the initrd we shouldn't try
to load the boot cache file when shutting down.
2013-02-25 14:42:48 -05:00
Ray Strode
59d78b4427 main: all update-root-fs for shutdown
Some distros now switch root back to the initrd at shutdown.

This commit allows plymouth to go along for the ride.
2013-02-25 14:39:25 -05:00
Ville Skyttä
5ee5644f6c generate-initrd: Use pigz if available. 2013-02-12 17:33:19 -05:00
Ville Skyttä
d0dd6da15e gitignore: Ignore systemd service and path files. 2013-02-12 17:32:48 -05:00
Ray Strode
b1140c1936 utils: don't create pipes non-blocking
The daemonizing code depends on its pipe io being
blocking.  The other user of ply_open_unidirectional_pipe
will work with blocking or non blocking io.

This commit changes ply_open_unidirectional_pipe to create
blocking pipes.  This started causing failures with
commit 9ec69929 since it replaced broken code (passing
O_NONBLOCK to fcntl(fd, F_SETFD.. instead of F_SETFL)
with working code.
2012-12-11 14:41:34 -05:00
Colin Walters
00ecc7bbb1 utils: Add strerror(errno) to error message
So it's easier to debug why it fails.
2012-12-11 14:41:30 -05:00
Ray Strode
dfa89fb70e main: ensure add_consoles_from_file terminates buffer string
This isn't a real problem in practice, since the files getting
read will be much smaller than the buffer, but it looks bad.

This commit ensures the buffer always leaves room for the terminating
NUL.
2012-12-10 11:55:32 -05:00
Ray Strode
d117949de9 main: fix small leak 2012-12-10 11:52:43 -05:00
Ray Strode
b5cfd7fb30 text-progress-bar: fix os string parsing
If there's no newline the the end of string variable will be NULL
instead of at the end of string.
2012-12-10 11:50:07 -05:00
Will Woods
73f1d3e44f throbgress: add more debug spew
These were melded into place from two-step
2012-11-29 17:14:44 -05:00
Will Woods
a9703fb6e3 populate-initrd: If PLYMOUTH_THEME_NAME is set, write it into plymouthd.conf
You can set PLYMOUTH_THEME_NAME when building initramfs to get a
different theme into initramfs, but this doesn't change the default
theme, so the resulting initramfs won't actually use the theme we
installed.

This patch makes plymouth-populate-initrd rewrite the 'Theme=XXX' line
in plymouthd.conf, so plymouth will use the theme we install.
2012-11-29 17:14:44 -05:00
Ray Strode
0b73cc8c41 key-file: use %m instead of %a in fscanf
It's meaning is less muzzled and this fixes a compiler warning.
2012-11-07 14:45:03 -05:00
Cristian Rodríguez
ea91c67061 Use fseeko and ftello just for the sake of LFS correctness
No bug involved.
2012-11-07 14:43:18 -05:00
Cristian Rodríguez
91a1d438d4 Use O_CLOEXEC where adequate, simplify its use. 2012-11-07 14:35:30 -05:00
Christoph Brill
7adb50c267 systemd: add WantedBy snippets
This fixes systemctl enable.

https://bugs.freedesktop.org/show_bug.cgi?id=38348
2012-11-07 14:33:59 -05:00
Ray Strode
a6129abfc5 main: make plymouth show-splash idempotent
plymouth show-splash causes hairy things, that should only happen once,
like activating renderers to happen.

This commit makes subsequent show-splash calls be no-ops.
2012-11-02 17:26:41 -04:00
Ray Strode
b3548ebaf7 two-step: don't update progress when idle
We've already reach a state where we aren't drawing anymore, etc,
so don't update progress and potentially fire off animations
that won't be seen.
2012-11-01 17:16:07 -04:00
Ray Strode
6ccedf7b6e main: if deactivate when already deactivated return immediately
We were trying to ignore second deactivate requests, but
were instead crashing because we're trying to use a nullified
trigger.

This commit makes sure things don't go crashy when a user
does "plymouth deactivate" on an already deactivated plymouthd.
2012-11-01 17:06:30 -04:00
Ray Strode
f3b9d25f29 configure: bump to 0.8.8 2012-10-26 11:01:45 -04:00
Ray Strode
00946e8204 x11: make window fullscreen by default
The x11 plugin currently does multi-head by default, which is
sometimes useful, but often just gets in the way.

This commit makes it use one, fullscreen head by default, and
falls back to the old behavior if the PLY_CREATE_FAKE_MULTI_HEAD_SETUP
environment variable is set.
2012-10-24 16:26:27 -04:00
Ray Strode
9f444e8281 x11: only create windows when necessary
right now, if a user does show-splash
more than once, the X11 plugin will keep recreating
windows.

This commit changes it to only create windows when necessary.
2012-10-24 16:12:23 -04:00
Ray Strode
7506f8e0a0 space-flares: reshow label after changing message
We should call ply_label_show any time we have a message
to show, so that if the root filesystem gets mounted, we
can try to load the label plugin again.

This should prevent weird situations where the text shows up
invisible unless the user hits escape twice.

http://bugs.freedesktop.org/show_bug.cgi?id=55669
2012-10-24 15:44:41 -04:00
Ray Strode
1ca333981d fade-throbber: reshow label after changing message
We should call ply_label_show any time we have a message
to show, so that if the root filesystem gets mounted, we
can try to load the label plugin again.

This should prevent weird situations where the text shows up
invisible unless the user hits escape twice.

http://bugs.freedesktop.org/show_bug.cgi?id=55669
2012-10-24 15:44:10 -04:00
Ray Strode
15171685d8 throbgress: reshow label after changing message
We should call ply_label_show any time we have a message
to show, so that if the root filesystem gets mounted, we
can try to load the label plugin again.

This should prevent weird situations where the text shows up
invisible unless the user hits escape twice.

http://bugs.freedesktop.org/show_bug.cgi?id=55669
2012-10-24 15:43:31 -04:00
Ray Strode
370c46d5d4 two-step: reshow label after changing message
We should call ply_label_show any time we have a message
to show, so that if the root filesystem gets mounted, we
can try to load the label plugin again.

This should prevent weird situations where the text shows up
invisible unless the user hits escape twice.

http://bugs.freedesktop.org/show_bug.cgi?id=55669
2012-10-24 15:40:48 -04:00
Ray Strode
4b7fe818d9 boot-splash: avoid crash if plugin doesn't support system updates
Right now if the user hits escape a couple of times they'll get
a crash, since the details plugin doesn't support system updates.

This commit makes ply_boot_splash_system_update a no-op in the
event the splash doesn't support that feature.
2012-10-24 14:52:24 -04:00
Ray Strode
a91db63f11 throbber: stop throbber when freed
It's possible that a throbber could get freed while animating.
In that case, stop the animation right away, so we don't keep
running the animation timeout on freed memory.
2012-10-24 13:13:28 -04:00
Ray Strode
fcf947fe7c animaton: stop animation when freed
It's possible that an animation could get freed before it finishes.
In that case, finish the animation right away, so we don't keep running the
animation timeout on freed memory.
2012-10-24 13:13:28 -04:00
Richard Hughes
2646c1b812 throbgress: support system-update feature
This commit adds support for the system-update command
by updating the throbgress progress bar.
2012-09-26 12:51:05 -04:00
Colin Walters
db203daca0 main: Quiet compiler warning about free(const char *)
Just make a duplicate variable.
2012-09-25 15:08:29 -04:00
Ray Strode
c4ec174150 plymouthd: set default theme to spinner
It's a nicer default than fade-in.
2012-09-21 15:54:47 -04:00
Ray Strode
67c654a702 text: drop unused defines 2012-09-18 14:34:27 -04:00