summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2016-04-12install: change in_search_path() to take a LookupPaths structureLennart Poettering
Similar to the other calls that operate on the collected path data.
2016-04-12install: rename unit_file_is_generated() → path_is_generator()Lennart Poettering
This way the funciton name matches nicely our other calls path_is_config() and path_is_runtime().
2016-04-12install: be more accurate when checking whether something is runtime ↵Lennart Poettering
configuration Let's actually check the runtime config dir, instead of just /run.
2016-04-12network: hashmap_put() can failLennart Poettering
Let's properly handle hashmap_put() failing.
2016-04-12core: introduce MANAGER_IS_RELOADING() macroLennart Poettering
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.
2016-04-12core: remove ManagerRunningAs enumLennart Poettering
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.
2016-04-12systemctl: port systemctl over to the new LookupPaths configuration ↵Lennart Poettering
directory fields
2016-04-12install: make use of configuration directory paths in LookupPathsLennart Poettering
Now that the LookupPaths structure contains the directory paths, let's make use of that everywhere instead of duplicating the logic.
2016-04-12core: add configuration directories to LookupPathsLennart Poettering
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.
2016-04-12core: when enabling a generated unit file, return a clean errorLennart Poettering
Let's be precise when the user tries to invoke an "enable" operation on a generated unit file.
2016-04-12core: add a new unit file state "generated"Lennart Poettering
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
2016-04-12core: rework generator dir logic, move the dirs into LookupPaths structureLennart Poettering
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.
2016-04-12man: minor nspawn doc fixesLennart Poettering
2016-04-12core: drop SysV paths from path-lookup logicLennart Poettering
We don't need it anymore, give that sysv-generator can determine the path on its own now.
2016-04-12sysv-generator: don't use LookupPath logic for determining SysV pathsLennart Poettering
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).
2016-04-12import: drop unused definitionLennart Poettering
2016-04-12Merge pull request #3016 from martinpitt/systemctl-enableLennart Poettering
Install: correctly report symlink creations
2016-04-12Do not report masked units as changed (#2921)Zbigniew Jędrzejewski-Szmek
* 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().
2016-04-12rules: set SYSTEMD_READY=0 on DM_UDEV_DISABLE_OTHER_RULES_FLAG=1 only with ↵Lukáš Nykrýn
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
2016-04-11tests: port udev-test to log_*_errno (#3015)Evgeny Vereshchagin
SYSTEMD_LOG_LEVEL=debug test/udev-test.pl is working now Also, fixes CID 1354602
2016-04-11Install: correctly report symlink creationsMartin Pitt
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".
2016-04-11Merge pull request #3014 from msekletar/nspawn-empty-machine-id-v3Lennart Poettering
nspawn: always setup machine id (v3)
2016-04-11nspawn: always setup machine idMichal Sekletar
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.
2016-04-11Merge pull request #3012 from martinpitt/hwdbLennart Poettering
hwdb updates
2016-04-11Merge pull request #3011 from evverx/dont-silently-skip-test-namespaceRonny Chevalier
tests: don't silently skip `test-namespace`
2016-04-11Merge pull request #2996 from keszybz/coverity-fixesMartin Pitt
Coverity fixes
2016-04-11keymap: Add HP ProBook 640 G2Martin Pitt
Fixes #2997
2016-04-11hwdb: Add SteelSeries Sensei Raw mouseMartin Pitt
Fixes #3009
2016-04-10tests: don't silently skip `test-namespace`Evgeny Vereshchagin
2016-04-10Merge pull request #3008 from evverx/udev-test-ignore-some-mount-errorsZbigniew Jędrzejewski-Szmek
tests: ignore some mount errors in test-udev
2016-04-10tests: ignore some mount errors in test-udevEvgeny Vereshchagin
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
2016-04-10Merge pull request #3002 from robertwec/masterMartin Pitt
hwdb: Add MODECOM MC-WM4 and Sharkoon Shark Force
2016-04-10Merge pull request #3004 from tsmock/masterMartin Pitt
hwdb/70-mouse.hwdb: Add Dynex Wired Mouse (DX-WMSE2)
2016-04-09hwdb/70-mouse.hwdb: Add Dynex Wired Mouse (DX-WMSE2)Taylor Smock
2016-04-10hwdb: Add MODECOM MC-WM4 and Sharkoon Shark ForceRobert Węcławski
2016-04-08core/service: only search for pid if loading from file failedZbigniew Jędrzejewski-Szmek
CID #1237511.
2016-04-08core/service: drop return value that is always ignored anywayZbigniew Jędrzejewski-Szmek
2016-04-08shutdown: use (void)Zbigniew Jędrzejewski-Szmek
NULL cgroup is handled below.
2016-04-08nspawn: ignore failure to chdirZbigniew Jędrzejewski-Szmek
CID #1322380.
2016-04-08journal: assert gcry_mpi_scan succeededZbigniew Jędrzejewski-Szmek
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.
2016-04-08sd-resolve: ignore error in pthread_join()Zbigniew Jędrzejewski-Szmek
CID #1338424.
2016-04-08basic/util: check return value of dup2 in fork_agent()Zbigniew Jędrzejewski-Szmek
CID #1304689.
2016-04-08import: use (void) moreZbigniew Jędrzejewski-Szmek
CID #1299018-9.
2016-04-08udevadm: assert return valueZbigniew Jędrzejewski-Szmek
This mirrors what we do in now(). CID #1351755.
2016-04-08udevd: use (void) to silence coverityZbigniew Jędrzejewski-Szmek
CID #1351429.
2016-04-08resolved: handle oom properlyZbigniew Jędrzejewski-Szmek
CID #1349699-1349700.
2016-04-08network: check return valueZbigniew Jędrzejewski-Szmek
CID #1349698.
2016-04-08Merge pull request #2990 from evverx/sys-depends-on-sys-tar-xzLennart Poettering
build-sys: test/sys depends on test/sys.tar.xz
2016-04-08build-sys: test/sys depends on test/sys.tar.xzEvgeny Vereshchagin
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
2016-04-08Merge pull request #2985 from keszybz/lldp-assertMartin Pitt
Replace if with assert_cc in lldp code and a build-sys tweak