Age | Commit message (Collapse) | Author |
|
All active units will call unit_notify() during coldplug, so we just
make sure we're counting from zero again and get the correct result for
n_on_console.
For n_running_jobs we likewise reset it to zero and then count
the running jobs as we encounter them in deserialization.
|
|
unit_notify is fired in deserelization code (particulary in
service_set_state). Units passed in random order, and there is possibility,
that unit with StopWhenUnneeded=yes passed before it actual dependecies. In
that case unit will be stopped as unneeded, because deps in UNIT_INACTIVE state
yet.
So, reuse similar logic (unit.c:1421) to avoid this race
|
|
|
|
don't misunderstand parse failures as OOM
http://lists.freedesktop.org/archives/systemd-devel/2013-February/009179.html
|
|
Correctly detect rbind mount option as bind mount.
Fixes https://bugzilla.novell.com/show_bug.cgi?id=804575.
|
|
Sometimes the boot gets stuck until a timeout hits. The usual timeouts
are on the order of minutes, so users may lose patience.
Print animated status messages telling the names of units with running
jobs to make it easy to see what systemd is waiting for.
The animation looks cooler with a shorter interval, but 1 s is OK and
should not be too hard on slow serial console users.
|
|
|
|
There is some guesswork, but it should work satisfactorily for the
purpose of knowing when to suppress printing of status messages.
|
|
Similar to already existing is_terminal_input().
Note that the only current user (connect_logger_as) is never called
for EXEC_OUTPUT_TTY, so it won't mind whether we accept it.
|
|
|
|
Ephemeral status lines do not end with a newline and they expect to be
overwritten by the next printed status line.
|
|
Like other status messages, this one too should not be printed
unconditionally, but it should take the manager state into account.
unit_status_printf() does that.
|
|
Take advantage of the fact that almost all callers want to pass unit
description as the last parameter. Those who don't can use the more
flexible manager_status_printf().
|
|
They're not used outside manager.c anymore.
|
|
unit_status_printf() checks the state of the manager, not of the unit
as such. Move it to manager.c and rename it to manager_status_printf().
Temporarily keep unit_status_printf as a wrapper macro.
|
|
|
|
This introduces a new static list of known attributes and their special
semantics. This means that cgroup attribute values can now be
automatically translated from user to kernel notation for command line
set settings, too.
This also adds proper support for multi-line attributes.
|
|
|
|
Add a new job mode: replace-irreversibly. Jobs enqueued using this mode
cannot be implicitly canceled by later enqueued conflicting jobs.
They can however still be canceled with an explicit "systemctl cancel"
call.
|
|
It is not really necessary to have a hard requirement dependency on
systemd-journald.socket in almost every unit. The socket gets pulled
into boot via at least two ways:
sockets.target -> systemd-journald.socket
sysinit.target -> systemd-journald.service -> systemd-journald.socket
So just assume something pulled the socket in and drop the automatic
requirement dependencies on it.
"systemctl stop systemd-journald.socket" will now not take the whole
system down with it.
|
|
journald is supposed to work. Failure to connect to its socket implies
losing messages. It should be a very unusual event. Log the failure with
LOG_CRIT.
Just because this unit's stdout/stderr failed to connect to the journal
does not necessarily mean that we shouldn't try to log the failure using
a structured entry, so let's use log_struct_unit.
|
|
The functions are quite similar. Unify them into one.
The source gets shorter, the binary gets slightly smaller.
|
|
Almost every unit logs to the journal. If journald gets a permanent
failure, units would not be able to start (exit code 209/STDOUT).
Add a fallback to /dev/null to avoid making the system entirely
unusable in such a case.
|
|
Only set source for freshly created .mounts coming from
mountinfo file.
|
|
Also split out some fileio functions to fileio.c and provide a SELinux
aware pendant in fileio-label.c
see https://bugzilla.redhat.com/show_bug.cgi?id=881577
|
|
|
|
https://bugzilla.redhat.com/show_bug.cgi?id=883043
|
|
Alias as systemd-user.conf is also provided. This should help
users running systemd in session mode.
https://bugzilla.redhat.com/show_bug.cgi?id=690868
|
|
|
|
Fixes this bug:
alxchk > systemctl --user set-environment A=B
alxchk > systemctl --user show-environment | grep ^A=
A=B
alxchk > systemctl --user daemon-reexec
alxchk > systemctl --user show-environment | grep ^A=
alxchk >
|
|
|
|
|
|
|
|
UnsetEnvironment() bus calls
|
|
|
|
Now, actually check if the environment variable names and values used
are valid, before accepting them. With this in place are at some places
more rigid than POSIX, and less rigid at others. For example, this code
allows lower-case environment variables (which POSIX suggests not to
use), but it will not allow non-UTF8 variable values.
All in all this should be a good middle ground of what to allow and what
not to allow as environment variables.
(This also splits out all environment related calls into env-util.[ch])
|
|
|
|
|
|
==6129== Syscall param socketcall.getsockopt(optlen) points to uninitialised byte(s)
==6129== at 0x312D0F325A: getsockopt (syscall-template.S:81)
==6129== by 0x4615E6: get_audit_data (selinux-access.c:268)
==6129== by 0x461A81: selinux_access_check (selinux-access.c:394)
==6129== by 0x453B23: bus_manager_message_handler (dbus-manager.c:1395)
==6129== by 0x313581D9C4: _dbus_object_tree_dispatch_and_unlock (dbus-object-tree.c:862)
==6129== by 0x313580FC1F: dbus_connection_dispatch (dbus-connection.c:4672)
==6129== by 0x44CD4C: bus_dispatch (dbus.c:528)
==6129== by 0x41292F: manager_loop (manager.c:1573)
==6129== by 0x40CD8E: main (main.c:1735)
==6129== Address 0x7fefff2c0 is on thread 1's stack
|
|
This can be pretty important for the user, and is not trivial
to figure out in all cases.
Also show failing path in error messages.
|
|
The ability to start a new unit with 'systemctl start ...' should not
depend on whether there are other units in the directory. Previously,
an additional 'systemctl daemon-reload' would be necessary to tell
systemd to update the list of unit lookup paths.
|
|
This allows one templated unit to refer to another templated unit
at installation time.
Examples:
> grep WantedBy ~/.config/systemd/user/mpop@.timer
WantedBy=services@%i.target
> srv disable mpop@iit.timer
rm '/home/alxchk/.config/systemd/user/services@iit.target.wants/mpop@iit.timer'
> srv enable mpop@iit.timer
ln -s '/home/alxchk/.config/systemd/user/mpop@.timer' '/home/alxchk/.config/systemd/user/services@iit.target.wants/mpop@iit.timer'
Based-on-patch-by: Oleksii Shevchuk <alxchk@gmail.com>
|
|
When the username was not explicitly specified, both %U and %u would
print the username. Make %U always print UID.
|
|
No functional change. This makes it possible to use them in install.c.
|
|
|
|
This fixes a bug where a job with --ignore-dependencies would wait for
other jobs because it merged into a previously queued job.
|
|
|
|
I don't see why this should be logged at all, so let's delete it.
|
|
|
|
A watchdog notification may be handled after the watchdog timer was stopped
while stopping the service. As a result the timer is restarted and the
service may be restarted as well.
The watchdog timestamp is initially set during startup in
service_enter_start_post() and cleared when the timer is stopped. Therefore
it can be used as an indication if the timer should be reset.
|