Age | Commit message (Collapse) | Author |
|
|
|
This adds support for a new environment variable
SYSTEMCTL_INSTALL_CLIENT_SIDE, that ensures that systemctl executes
install operations client-side instead of passing them to PID1. This is
useful in debugging situations, but even beyond that. However, we don't
want to make it official API, hence let's just make it an undocumented
environment variable.
Similar, add a second variable, SYSTEMCTL_SKIP_SYSV which allows
skipping the SysV chkconfig fall-back if set. This is useful for similar
reasons, and exposed as undocumented as environment variable for similar
reasons, too.
|
|
|
|
|
|
It's a very weak kind of virtualization, after all.
|
|
|
|
|
|
|
|
|
|
We don't need two functions that do essentialy the same, hence drop
path_get_parent(), and stick to dirname_malloc(), but move it to
path-util.[ch].
|
|
|
|
|
|
|
|
There are more than enough to deserve their own .c file, hence move them
over.
|
|
Let's introduce a common function that makes relative paths absolute and
warns about any errors while doing so.
|
|
I accidentally broke this a while back when I ported systemctl to the
verbs logic.
Add support for this back.
|
|
There was a bad memory access among other smaller issues.
|
|
This commit fixes Coverity #1325228
|
|
sd-daemon: fix return value for sd_is_mq
|
|
Shell completion tweaks
|
|
|
|
following parameter
We currently completely ignore the following parameter, but we really
should not, as that is actually the time to shut down on.
|
|
|
|
Also add a Coccinell patch to detect such locations in the future.
|
|
|
|
|
|
Let's parse the command line the same way in our various tools.
|
|
Otherwise, wall messages will not be generated for root.
|
|
|
|
In most verbs it's fine to treat the arguments array being NULL is empty
array, hence do so.
|
|
|
|
Also adds a couple of "return" statements, where they are missing.
|
|
Sometimes we have to connect to the system manager directly (early boot,
initrd, late boot, ...), sometimes through the system bus (unprivileged,
remote, logind, ...). Instead of guessing in advance, which kind of
connection we require (and sometimes guessing incorrectly), let's make
sure each time we need bus connection we request the right bus
explicitly.
This way, we set up exactly the bus connections require, never guess
incorrectly, and do so only immediately when necessary.
As effect this reworks avoid_bus() into install_client_side(), since
that's all it determines now: whether to install unit files client-side
or server-side (i.e. in PID 1).
|
|
In sd-bus, the sd_bus_open_xyz() family of calls allocates a new bus,
while sd_bus_default_xyz() family tries to reuse the thread's default
bus. bus_open_transport() sometimes internally uses the former,
sometimes the latter family, but suggests it only calls the former via
its name. Hence, let's avoid this confusion, and generically rename the
call to bus_connect_transport().
Similar for all related calls.
And while we are at it, also change cgls + cgtop to do direct systemd
connections where possible, since all they do is talk to systemd itself.
|
|
Let's clarify that this function is specific to shutdown time
specifications, nothing else.
|
|
|
|
Previously, we'd allocate it sometimes from the heap, but otherwise let
it point directly int argv[]. Let's clean this up, so that we know
exactly how to release its resources, and do so at the end.
|
|
|
|
logind sends out wall messages now, let's remove this from the systemctl
client side hence. If people build systemd without logind support they
won't get wall messages now, but that's OK.
|
|
Make it generic, call it strv_skip() and move it to strv.[ch]
|
|
|
|
|
|
Let's make sure the main switch statement only invokes functions, but
doesn't do anything real on its own.
|
|
Let's move its dispatching to the main switch statement.
|
|
Let's not have the same code three times, but reduce it to one function.
|
|
booted with systemd
This sounds like the better place to expose this than in "systemd-notify
--booted".
Also document the so far undocumented "unknown" state the command might
return. And rearrange the table of states documented to be more like the
one for "is-running".
Also, don't document the precise exit code of this function, just say
errors are reported != 0 or > 0...
|
|
This also allows us to drop build.h from a ton of files, hence do so.
Since we touched the #includes of those files, let's order them properly
according to CODING_STYLE.
|
|
|
|
This mirrors --type=help and simplifies completion scripts.
The array of states is dense, so the is no need to check if the string is null.
|
|
sd-bus: introduce new sd_bus_default_flush_close() call
|