Age | Commit message (Collapse) | Author |
|
Similar to the other calls that operate on the collected path data.
|
|
This way the funciton name matches nicely our other calls path_is_config() and
path_is_runtime().
|
|
configuration
Let's actually check the runtime config dir, instead of just /run.
|
|
Let's properly handle hashmap_put() failing.
|
|
This replaces the old function call manager_is_reloading_or_reexecuting() which
was used only at very few places. Use the new macro wherever we check whether
we are reloading. This should hopefully make things a bit more readable, given
the nature of Manager:n_reloading being a counter.
|
|
Previously, we had two enums ManagerRunningAs and UnitFileScope, that were
mostly identical and converted from one to the other all the time. The latter
had one more value UNIT_FILE_GLOBAL however.
Let's simplify things, and remove ManagerRunningAs and replace it by
UnitFileScope everywhere, thus making the translation unnecessary. Introduce
two new macros MANAGER_IS_SYSTEM() and MANAGER_IS_USER() to simplify checking
if we are running in one or the user context.
|
|
directory fields
|
|
Now that the LookupPaths structure contains the directory paths, let's make use
of that everywhere instead of duplicating the logic.
|
|
Let's add a seperate fields for the directories where we place runtime and
persistent configuration, so that we can use this in install.c (to be added in
a later commit), and we store path information in the same place everywhere.
|
|
Let's be precise when the user tries to invoke an "enable" operation on a
generated unit file.
|
|
Now that we store the generator directories in LookupPaths we can use this to
intrdouce a new unit file state called "generated", for units in these
directories.
Fixes: #2348
|
|
A long time ago – when generators where first introduced – the directories for
them were randomly created via mkdtemp(). This was changed later so that they
use fixed name directories now. Let's make use of this, and add the genrator
dirs to the LookupPaths structure and into the unit file search path maintained
in it. This has the benefit that the generator dirs are now normal part of the
search path for all tools, and thus are shown in "systemctl list-unit-files"
too.
|
|
|
|
We don't need it anymore, give that sysv-generator can determine the path on
its own now.
|
|
The sysv-generator is the only user of the SysV paths these days, let's make it
figure out the right paths on its own.
(In a subsequent commit we can then drop the same logic from LookupPath).
|
|
|
|
Install: correctly report symlink creations
|
|
* core/unit: extract checking of stat paths into helper function
The same code was repeated three times.
* core: treat masked files as "unchanged"
systemctl prints the "unit file changed on disk" warning
for a masked unit. I think it's better to print nothing in that
case.
When a masked unit is loaded, set mtime as 0. When checking
if a unit with mtime of 0 needs reload, check that the mask
is still in place.
* test-dnssec: fix build without gcrypt
Also reorder the test functions to follow the way they are called
from main().
|
|
ADD event (#2747)
The "SYSTEMD_READY=0" will cause automatic unmount
of mountpoint that is on top of such DM device
if this is used with multipath which sets
DM_UDEV_DISABLE_OTHER_RULES_FLAG in case
we have a CHANGE event thatcomes after DM multipath
device reload when one of the paths is down or up.
See https://bugzilla.redhat.com/show_bug.cgi?id=1312011
|
|
SYSTEMD_LOG_LEVEL=debug test/udev-test.pl is working now
Also, fixes CID 1354602
|
|
All callers of create_symlink(), such as install_info_symlink_wants(), expect
that to return > 0 if it actually did something, and then return that number.
unit_file_enable() uses that to determine if any action was done
(carries_install_info != 0) and if not, show a "The unit files have no
[Install] section" warning.
Return 1 instead of 0 in the two code paths of create_symlink() when the link
was created or replaced with a new value.
This fixes getting a bogus "No [Install] section" warning when enabling a unit
with full path, like "systemctl enable /some/path/myunit.service".
|
|
nspawn: always setup machine id (v3)
|
|
We check /etc/machine-id of the container and if it is already populated
we use value from there, possibly ignoring value of --uuid option from
the command line. When dealing with R/O image we setup transient machine
id.
Once we determined machine id of the container, we use this value for
registration with systemd-machined and we also export it via
container_uuid environment variable.
As registration with systemd-machined is done by the main nspawn process
we communicate container machine id established by setup_machine_id from
outer child to the main process by unix domain socket. Similarly to PID
of inner child.
|
|
hwdb updates
|
|
tests: don't silently skip `test-namespace`
|
|
Coverity fixes
|
|
Fixes #2997
|
|
Fixes #3009
|
|
|
|
tests: ignore some mount errors in test-udev
|
|
Fixes:
$ sudo make distcheck
...
FAIL: test/udev-test.pl
...
$ vi systemd-229/_build/sub/test/udev-test.pl.log
...
failed to mount empty
/home/ubuntu/systemd/systemd-229/_inst/lib/udev/rules.d No such file or directory
...
failed to mount empty
/home/ubuntu/systemd/systemd-229/_inst/lib/udev/rules.d No such file or directory
...
414 errors occurred
|
|
hwdb: Add MODECOM MC-WM4 and Sharkoon Shark Force
|
|
hwdb/70-mouse.hwdb: Add Dynex Wired Mouse (DX-WMSE2)
|
|
|
|
|
|
CID #1237511.
|
|
|
|
NULL cgroup is handled below.
|
|
CID #1322380.
|
|
It might be nicer to propagate the error to the caller, but that'd
be a bigger refactoring. This shouldn't really fail, so just add
an assert.
CID #1349697.
|
|
CID #1338424.
|
|
CID #1304689.
|
|
CID #1299018-9.
|
|
This mirrors what we do in now().
CID #1351755.
|
|
CID #1351429.
|
|
CID #1349699-1349700.
|
|
CID #1349698.
|
|
build-sys: test/sys depends on test/sys.tar.xz
|
|
Fixes:
$ ls -ld test/sys
drwxr-xr-x. 12 vagrant vagrant 4096 Jan 6 2012 test/sys
$ git pull
Updating d4337c1..710a885
Fast-forward
...
test/sys.tar.xz | Bin 261380 -> 165116 bytes
test/udev-test.pl | 67 ++++++++++++-----
$ sudo make check TESTS=test/udev-test.pl
...
FAIL: test/udev-test.pl
$ rm -r test/sys
$ make test/sys
$ sudo make check TESTS=test/udev-test.pl
...
PASS: test/udev-test.pl
|
|
Replace if with assert_cc in lldp code and a build-sys tweak
|