1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-01 17:51:22 +03:00
Commit Graph

27333 Commits

Author SHA1 Message Date
Zbigniew Jędrzejewski-Szmek
19539807b5 shared/install: in install_context_mark_for_removal ignore not found units
With the following test case:
[Install]
WantedBy= default.target
Also=foobar-unknown.service

disabling would fail with:
$ ./systemctl --root=/ disable testing.service
Cannot find unit foobar-unknown.service.       # this is level debug
Failed to disable: No such file or directory.  # this is the error

After the change we proceed:
$ ./systemctl --root=/ disable testing.service
Cannot find unit foobar-unknown.service.
Removed /etc/systemd/system/default.target.wants/testing.service.

This does not affect specifying a missing unit directly:
$ ./systemctl --root=/ disable nosuch.service
Failed to disable: No such file or directory.
2016-10-18 21:30:47 -04:00
Lennart Poettering
70fd2125c3 Merge pull request #4382 from keszybz/unit-type-underline
systemctl: use underlines to seperate unit types in listing
2016-10-18 17:03:40 +02:00
Susant Sahani
59f62519f1 networkd: use proper cast to access VTI6 (#4399)
Fixes #4371.
2016-10-17 23:19:08 -04:00
Luca Bruno
52c239d770 core/exec: add a named-descriptor option ("fd") for streams (#4179)
This commit adds a `fd` option to `StandardInput=`,
`StandardOutput=` and `StandardError=` properties in order to
connect standard streams to externally named descriptors provided
by some socket units.

This option looks for a file descriptor named as the corresponding
stream. Custom names can be specified, separated by a colon.
If multiple name-matches exist, the first matching fd will be used.
2016-10-17 20:05:49 -04:00
Zbigniew Jędrzejewski-Szmek
a2fc3d87fb README: list dependencies for testing
Fixes #4365.
2016-10-17 16:54:27 +00:00
Evgeny Vereshchagin
c7934185fe tests: add smoke test for systemd-nspawn
Basically, this test runs:
```
    systemd-nspawn --register=no -D "$_root" -b
    systemd-nspawn --register=no -D "$_root" --private-network -b
    systemd-nspawn --register=no -D "$_root" -U -b
    systemd-nspawn --register=no -D "$_root" --private-network -U -b
```
and exports the `UNIFIED_CGROUP_HIERARCHY=[yes|no]`, `SYSTEMD_NSPAWN_USE_CGNS=[yes|no]`

Inspired by
* systemd#3589 (comment)
* systemd#4372 (comment)
* systemd#4223 (comment)
* systemd#1555

and so on :-)
2016-10-17 16:50:09 +00:00
Zbigniew Jędrzejewski-Szmek
caf15ff01e man: add a note that NULL "s" arg for sd_bus_message_append 2016-10-17 12:22:44 -04:00
Zbigniew Jędrzejewski-Szmek
5c98198f67 terminal-util: helper macro for highlighting functions 2016-10-17 11:48:12 -04:00
Zbigniew Jędrzejewski-Szmek
6ae3e62a54 systemctl: ditto for list-unit-files 2016-10-17 11:47:45 -04:00
Zbigniew Jędrzejewski-Szmek
16484a8a15 systemctl: use underlines to seperate unit types in listing
(printf("%.*s", -1, "…") is the same as not specifying the precision at all.)

v2: also underline highlighted (failing) units

Fixes #4137.
2016-10-17 11:37:41 -04:00
Lennart Poettering
c7458f9399 man: avoid abbreviated "cgroups" terminology (#4396)
Let's avoid the overly abbreviated "cgroups" terminology. Let's instead write:

"Linux Control Groups (cgroups)" is the long form wherever the term is
introduced in prose. Use "control groups" in the short form wherever the term
is used within brief explanations.

Follow-up to: #4381
2016-10-17 09:50:26 -04:00
llua
6c9414a700 zsh-completion: fix for #4318 (#4394)
Escape unit names for the eval call in _call_program

The value of the Id property is transformed back into a unit name
usable by systemctl.
system-systemd\x5cx2dcryptsetup.slice -> system-systemd\x2dcryptsetup.slice

Also filter units by property via parameter expansion, not a for loop
2016-10-17 14:35:26 +02:00
Lennart Poettering
cdc31c592a Merge pull request #4392 from keszybz/running-timers
Fix for display of elapsed timers
2016-10-17 12:58:55 +02:00
Lennart Poettering
f213900b5a Merge pull request #4387 from keszybz/loginctl-tty
loginctl: print TTY field in the session listing
2016-10-17 11:36:25 +02:00
Zbigniew Jędrzejewski-Szmek
010454b459 shared/install: do not break loop when we enounter a dangling symlink
We should ignore that unit, but otherwise continue.
2016-10-17 02:26:55 -04:00
Zbigniew Jędrzejewski-Szmek
9b914a9d6b man: mention that systemctl --root=/ operates on the fs directly 2016-10-17 02:26:42 -04:00
Zbigniew Jędrzejewski-Szmek
6e2c9ce1b6 core/timer: reset next_elapse_*time when timer is not waiting
When the unit that is triggered by a timer is started and running,
we transition to "running" state, and the timer will not elapse again
until the unit has finished running. In this state "systemctl list-timers"
would display the previously calculated next elapse time, which would
now of course be in the past, leading to nonsensical values.

Simply set the next elapse to infinity, which causes list-timers to
show n/a. We cannot specify when the next elapse will happen, possibly
never.

Fixes #4031.
2016-10-17 02:06:20 -04:00
Zbigniew Jędrzejewski-Szmek
ba25d39e44 pid1: do not use mtime==0 as sign of masking (#4388)
It is allowed for unit files to have an mtime==0, so instead of assuming that
any file that had mtime==0 was masked, use the load_state to filter masked
units.

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1384150.
2016-10-17 07:15:03 +02:00
Martin Pitt
a775369354 Merge pull request #4391 from keszybz/treewide-macros
Use mfree more and add another function to simplify a common set&free pattern
2016-10-17 07:12:20 +02:00
Martin Pitt
9e7727521f Merge pull request #4381 from keszybz/man-pages 2016-10-17 06:56:22 +02:00
Zbigniew Jędrzejewski-Szmek
250517d2d3 test-calendarspec: test that hourly timers are incremented properly
Apparently this works just fine, so the issue in #4031 is elsewhere.
2016-10-17 00:08:43 -04:00
Zbigniew Jędrzejewski-Szmek
3b319885c4 tree-wide: introduce free_and_replace helper
It's a common pattern, so add a helper for it. A macro is necessary
because a function that takes a pointer to a pointer would be type specific,
similarly to cleanup functions. Seems better to use a macro.
2016-10-16 23:35:39 -04:00
Zbigniew Jędrzejewski-Szmek
6b430fdb7c tree-wide: use mfree more 2016-10-16 23:35:39 -04:00
Zbigniew Jędrzejewski-Szmek
d7604756ca shared/install: use _cleanup_free_
Also rewrap some comments so that they don't have a very long line and a very
short line.
2016-10-16 23:29:13 -04:00
Peter Hutterer
57e8c8524e Merge pull request #4380 from bgamari/master
hwdb: Add sensitivity for Dell Latitude E7470 pointing stick
2016-10-17 13:17:03 +10:00
Zbigniew Jędrzejewski-Szmek
5611ddebe4 loginctl: report tty in session listings
Without the tty it's really hard to tell which session is which.

New output:
$ ./loginctl
   SESSION        UID USER             SEAT             TTY
        13       1002 zbyszek          seat0            tty3
        c1         42 gdm              seat0            /dev/tty1
        11       1002 zbyszek          seat0            tty4
         3       1002 zbyszek          seat0            /dev/tty2
        17       1002 zbyszek          seat0            tty5
        18       1002 zbyszek          seat0            tty6
6 sessions listed.
2016-10-16 15:59:22 -04:00
Zbigniew Jędrzejewski-Szmek
e8f215d34c loginctl: drop casts in printf 2016-10-16 15:59:22 -04:00
Martin Ejdestig
6d6e4ddd3d man: document sd_event_get_tid() return value (#4385) 2016-10-16 10:25:34 -04:00
Zbigniew Jędrzejewski-Szmek
d0d5f0f778 man: drop discouragment of runtime and vendor drop-ins
In certain situations drop-ins in /usr/lib/ are useful, for example when one package
wants to modify the behaviour of another package, or the vendor wants to tweak some
upstream unit without patching.

Drop-ins in /run are useful for testing, and may also be created by systemd itself.

Follow-up for the discussion in #2103.
2016-10-15 18:45:18 -04:00
Zbigniew Jędrzejewski-Szmek
50e666288b man: add journal-upload.conf(5)
Fixes #3370.
2016-10-15 18:45:18 -04:00
Zbigniew Jędrzejewski-Szmek
a8d46a1663 man: add notes about thread safety of sd_journal_* functions
Fixes #4056.
2016-10-15 18:38:20 -04:00
Zbigniew Jędrzejewski-Szmek
74b47bbd5d man: add crosslink between systemd.resource-control(5) and systemd.exec(5)
Fixes #4379.
2016-10-15 18:38:20 -04:00
Lukáš Nykrýn
08a28eeca7 virt: add possibility to skip the check for chroot (#4374)
https://bugzilla.redhat.com/show_bug.cgi?id=1379852
2016-10-15 13:54:58 -04:00
Ben Gamari
579a2ab3d6 hwdb: Add sensitivity for Dell Latitude E7470 pointingstick 2016-10-15 12:11:03 -04:00
Tejun Heo
7d862ab8c2 core: make settings for unified cgroup hierarchy supersede the ones for legacy hierarchy (#4269)
There are overlapping control group resource settings for the unified and
legacy hierarchies.  To help transition, the settings are translated back and
forth.  When both versions of a given setting are present, the one matching the
cgroup hierarchy type in use is used.  Unfortunately, this is more confusing to
use and document than necessary because there is no clear static precedence.

Update the translation logic so that the settings for the unified hierarchy are
always preferred.  systemd.resource-control man page is updated to reflect the
change and reorganized so that the deprecated settings are at the end in its
own section.
2016-10-14 21:07:16 -04:00
Thomas H. P. Andersen
5c4624e082 nspawn: remove unused variable (#4369) 2016-10-14 00:30:28 +03:00
Lennart Poettering
8bfdf29b24 Merge pull request #4243 from endocode/djalal/sandbox-first-protection-kernelmodules-v1
core:sandbox: Add ProtectKernelModules= and some fixes
2016-10-13 18:36:29 +02:00
Zbigniew Jędrzejewski-Szmek
f5df066d1d Merge pull request #653 from dvdhrm/bus-gold 2016-10-13 12:25:56 -04:00
Daniel Mack
d02b5af3f3 Merge pull request #4363 from stefan-it/replace-while-loops
basic,coredump: use for loop instead of while
2016-10-13 15:56:23 +02:00
Daniel Mack
c5a6157b4a Merge pull request #4364 from phomes/man-fixes
man: typo fixes
2016-10-13 15:55:40 +02:00
Evgeny Vereshchagin
f0bef277a4 nspawn: cleanup and chown the synced cgroup hierarchy (#4223)
Fixes: #4181
2016-10-13 09:50:46 -04:00
Zbigniew Jędrzejewski-Szmek
c1a9199ec4 Merge pull request #4362 from poettering/journalbootlistfix 2016-10-13 07:45:09 -04:00
Thomas Hindoe Paaboel Andersen
2dd678171e man: typo fixes
A mix of fixes for typos and UK english
2016-10-12 23:02:44 +02:00
Stefan Schweter
aa7530d681 coredump: use for() loop instead of while() 2016-10-12 22:49:01 +02:00
Stefan Schweter
e7f1334f07 basic: use for() loop instead of while() 2016-10-12 22:48:41 +02:00
Lennart Poettering
6612379adf Merge pull request #4358 from fsateler/pam-config
Pam config fixes
2016-10-12 20:41:52 +02:00
Lennart Poettering
da597d2b52 update TODO 2016-10-12 20:33:33 +02:00
Lennart Poettering
3cc44bf91b journalctl: say in which directory we vacuum stuff
Fixes: #4060
2016-10-12 20:25:20 +02:00
Lennart Poettering
8da830bca9 journalctl: don't claim the journal was stored on disk
Let's just say that the journal takes up space in the file system, not on disk,
as tmpfs is definitely a file system, but not a disk.

Fixes: #4059
2016-10-12 20:25:20 +02:00
Lennart Poettering
ae739cc1ed journal: refuse opening journal files from the future for writing
Never permit that we write to journal files that have newer timestamps than our
local wallclock has. If we'd accept that, then the entries in the file might
end up not being ordered strictly.

Let's refuse this with ETXTBSY, and then immediately rotate to use a new file,
so that each file remains strictly ordered also be wallclock internally.
2016-10-12 20:25:20 +02:00