Commit Graph
17666 Commits
Author SHA1 Message Date
Chris Mayo abed503bfe man: fix link to systemd-networkd-wait-online.service in systemd-networkd.service(8)
(cherry picked from commit da80c219d7)
2015-01-16 00:56:53 -05:00
Alison Chaiken 323e5a44de delta: Fix broken separator support
systemd-delta man page promises that multiple types of deltas will be
concatenated if they are listed with a comma as separator.  Replace
FOREACH_WORD() with FOREACH_WORD_SEPARATOR() to restore the functionality.

(cherry picked from commit d0a2e1c364)
2015-01-16 00:56:53 -05:00
Chris Atkinson 2595130924 man: update description of default extension for isolate
(cherry picked from commit 507e28d844)
2015-01-16 00:56:53 -05:00
Zbigniew Jędrzejewski-Szmek 4b1505597c delta: diff returns 1 when files differ, ignore this
https://bugs.debian/org/771397
(cherry picked from commit 820d3acfe9)

Conflicts:
	src/quotacheck/quotacheck.c
2015-01-16 00:56:53 -05:00
Tom Gundersen da312d164e shared: install - report error if mask symlink can not be marked for removal
(cherry picked from commit 56e73b34ce)
2015-01-16 00:56:52 -05:00
Tom Gundersen 97bcebda33 shared: time-dst - ensure nulstr is null terminated
Fixes CID #1237772.

(cherry picked from commit 681f9718ce)
2015-01-16 00:56:52 -05:00
Tom Gundersen 12dce8292a udev: rules - ignore the lack of trailing newline
Also accept '\r' as newline character.

This dropps warnings of the type:

  invalid key/value pair in file /usr/lib/udev/rules.d/40-usb-media-players.rules
  on line 26, starting at character 25 ('')

(cherry picked from commit 9f5ecdb0b1)
2015-01-16 00:56:52 -05:00
Tom Gundersen 4169b5e4ec udev: rules - print the first invalid character
The current code would print the character following the first invalid
character.

Given an udev rules-file without a trailing newline we would otherwise print
garbage:

  invalid key/value pair in file /usr/lib/udev/rules.d/40-usb-media-players.rules
  on line 26, starting at character 25 ('m')

This is now changed to print

  invalid key/value pair in file /usr/lib/udev/rules.d/40-usb-media-players.rules
  on line 26, starting at character 25 ('')

(still not very good as printing \0 just gives the empty string)

(cherry picked from commit 6501b52d35)
2015-01-16 00:56:52 -05:00
Tom Gundersen 05fcbfca91 udev: rules - modernise add_rule a bit
(cherry picked from commit 84198c1892)
2015-01-16 00:56:52 -05:00
Peter Hutterer 701afaabe7 udevadm hwdb: discard extra leading whitespaces in hwdb
Currently a property in the form of
  FOO=bar
is stored as " FOO=bar", i.e. the property name contains a leading space.
That's quite hard to spot.

This patch discards all extra whitespaces but the first one which is required
by libudev's hwdb_add_property.

[zj: modify the check a bit]

https://bugs.freedesktop.org/show_bug.cgi?id=82311
(cherry picked from commit 36afca67b6)
2015-01-16 00:56:52 -05:00
Michal Schmidt f4b75dd0e4 core: fix return value in error path after sd_event_add_io() failure
sd_event_add_io() does not set errno, it returns negative errno.

Noticed during log_*_errno conversions.

(cherry picked from commit 895b3a7b44)

Conflicts:
	src/core/manager.c
2015-01-16 00:56:52 -05:00
Zbigniew Jędrzejewski-Szmek 6d1f501b82 Revert "systemctl: append default suffix only if none present"
This reverts a chunk out of commit 5e03c6e3b5
which was trying to pass NULL to the the '.service' default. Anyway,
it seems better to be explicit.

(cherry picked from commit e80733be33)
2015-01-16 00:56:52 -05:00
Zbigniew Jędrzejewski-Szmek eac249866b systemctl: append default suffix only if none present
Simplify unit_name_mangle() and unit_name_mangle_with_suffix() to
always behave the same, and only append a suffix if there is no
type suffix. If a user says 'isolate blah.device' it is better to
return an error that the type cannot be isolated, than to try to
isolate blah.device.target.

(cherry picked from commit 5e03c6e3b5)
2015-01-16 00:56:52 -05:00
Martin Pitt 73257f8e61 hostnamectl: Exit with zero on success
In show_all_names(), bus_map_all_properties() returns 1 on success which is
then used as the return code of show_all_names() and eventually main(). Exit
with zero in main() on all nonnegative results to guard against similar errors.

(cherry picked from commit 5567fafbc9)
2015-01-16 00:56:52 -05:00
Zbigniew Jędrzejewski-Szmek 5f7252443d sysv-generator: advertise the man page
(cherry picked from commit aad0a2c800)
2015-01-16 00:56:52 -05:00
Zbigniew Jędrzejewski-Szmek c45ae44211 man: add systemd-sysv-generator(8)
In principle SysV stuff is only for compatibility, but we are stuck
with it for the forseeable future, so documentation might as well
be provided.

https://bugs.debian.org/771172
(cherry picked from commit f509443af5)
2015-01-16 00:56:51 -05:00
Ivan Shapovalov c5dc55446b unit-name: fix escaping logic in unit_name_mangle_with_suffix()
Make screened character set consistent with unit_name_mangle() by splitting off
the escaping loop into a separate function.

Before this fix, unit names such as `foo@bar.target` would get transformed
into `foo\x40bar.target` when unit_name_mangle_with_suffix() is used.

https://bugs.freedesktop.org/show_bug.cgi?id=86711
(cherry picked from commit 0c124f8b2c)
2015-01-16 00:56:51 -05:00
Andrej Manduch 0ae29bfc8b journalctl: print all possible lines immediately with --follow + --since
When I tryed to run journalctl with --follow and --since arguments it
behaved very strangely.
First It prints logs from what I specified in --since argument, then
printed 10 lines (as is default in --follow) and when app put something
new in to log journalctl printed everithing from the last printed line.

How to reproduce:
1. run: journalctl -m --since 14:00 --follow
Then you'll see 10 lines of logs since 14:00. After that wait until some
app add something in the journal or just run `systemd-cat echo test`
2. After that journalctl will print every single line since 14:00 and will
follow as expected.

As long as --since and --follow will eventually print all relevant
lines, I seen no reason why not to print them right away and not after
first new message in journal.

Relevant bugzillas:
        https://bugs.freedesktop.org/show_bug.cgi?id=71546
        https://bugs.freedesktop.org/show_bug.cgi?id=64291

(cherry picked from commit 70af7b8ada)
2015-01-16 00:56:51 -05:00
Zbigniew Jędrzejewski-Szmek 4828bc7a05 swap: restore support for nofail
systemd stops adding automatic dependencies on swap.target to swap
units. If a dependency is required, it has to be added by unit
configuration. fstab-generator did that already, except that now it is
modified to create a Requires or Wants type dependency, depending on
whether nofail is specified in /etc/fstab. This makes .swap units
obey the nofail/noauto options more or less the same as .mount units.

Documentation is extended to clarify that, and to make
systemd.mount(5) and system.swap(5) more similar. The gist is not
changed, because current behaviour actually matches existing
documentation.

https://bugs.freedesktop.org/show_bug.cgi?id=86488
(cherry picked from commit 5607d856b8)
2015-01-16 00:56:51 -05:00
Michal Schmidt 79b4165b84 core: fix assertion failure in checking a transaction with a JOB_NOP
Several functions called from transaction_activate() need to correctly
handle the case where a JOB_NOP job is being checked against a unit's
pending job. The assumption that JOB_NOP never merges with other job
types was correct, but since the job_type_is_*() functions are
implemented using the merge lookup, they need to special-case JOB_NOP
to avoid hitting assertion failures.

(cherry picked from commit 7e803f5ecf)
2015-01-16 00:56:51 -05:00
Tom Gundersen e1b6ecea56 resolved: fix typo in sd_notify() call
(cherry picked from commit b37d45c9ab)
2015-01-16 00:56:51 -05:00
Zbigniew Jędrzejewski-Szmek 920f8f0326 gpt-auto-generator: properly ignore value
A negative return code was treated as a true value.

(cherry picked from commit 8086ffacdb)
2015-01-16 00:56:51 -05:00
Zbigniew Jędrzejewski-Szmek 82c0579d83 manager: only issue overmount warning when the check succeeded
If for any reason the check failed (selinux?), we would still issue
the warning. Check the return status.

(cherry picked from commit 056edeb910)
2015-01-16 00:56:51 -05:00
Lukas Nykryn 16f571dcd3 dbus: return non-zero return value in the case that prefix won't match
strv_extend returns 0 in the case of success which means that
else if (bus_track_deserialize_item(&m->deserialized_subscribed, l) == 0)
        log_warning("Unknown serialization item '%s'", l);
will be printed when value is added correctly.

(cherry picked from commit f44b9efcec)
2015-01-16 00:56:51 -05:00
Zbigniew Jędrzejewski-Szmek 499e2f80d1 man: reword list-dependencies description
The previous version was a bit too vague. It is better
to simply list all dependency types that are followed.

Previous version also made an emphasis on dependencies introduced by
configuration.  But this command (or systemd) don't care about this
distinction between configured and automatically added dependencies at
all. This distinctionis removed from the main description, and an
explanatory paragraph is added to remind the user that all
dependencies are shown, no matter where they come from.

(cherry picked from commit f6375e8376)
2015-01-16 00:56:51 -05:00
Zbigniew Jędrzejewski-Szmek 18fc235c18 systemctl: show BindsTo/BoundBy in list-dependencies
Suggested-by: Peter Mattern <matternp@arcor.de>

http://lists.freedesktop.org/archives/systemd-devel/2014-November/025437.html
(cherry picked from commit c469089cf6)
2015-01-16 00:56:51 -05:00
Richard Schütz 19f3560483 nspawn: ignore EEXIST when mounting tmpfs
commit 79d80fc146 introduced a regression that
prevents mounting a tmpfs if the mount point already exits in the container's
root file system. This commit fixes the problem by ignoring EEXIST.

(cherry picked from commit 6c2d07020f)
2015-01-16 00:56:51 -05:00
Chris Atkinson 4f45221f4a man/logind.conf.xml: make consistent with default logind.conf
https://bugs.freedesktop.org/show_bug.cgi?id=86263
(cherry picked from commit 6e3157c5e6)
2015-01-16 00:56:50 -05:00
Zbigniew Jędrzejewski-Szmek f9837309c5 Do not check for existence of remote binaries
systemd-run would fail when run with -M or -H and an absolute path,
if this path did not exists locally. Allow it to continue, since we
don't have a nice way of checking if the binary exists remotely.

The case where -M or -H is used and a local path is unchanged, and we
still iterate over $PATH to find the binary. We need to convert to an
absolute path, and we don't have a nice mechanism to check remotely,
so we assume that the binary will be located in the same place locally
and remotely.

http://lists.freedesktop.org/archives/systemd-devel/2014-November/025418.html
(cherry picked from commit b63bd1090b)
2015-01-16 00:56:50 -05:00
Lukas Nykryn d9879bc255 selinux-access: fix broken ternary operator
it seems to be a typo introduced by ebcf1f97de
-                _r = selinux_access_check(_b, _m, _u->source_path ?:_u->fragment_path, (permission), &_error); \
+        ({ Unit *_unit = (unit); selinux_generic_access_check(bus,message, _unit->fragment_path ?: _unit->fragment_path, permission,error); })

(cherry picked from commit 1e648011b2)
2015-01-16 00:56:50 -05:00
Lennart Poettering 326f2a7395 sd-bus: create clean error when a property Set() call with incorrect signature is passed in
(cherry picked from commit 0ca454d474)
2015-01-16 00:56:50 -05:00
Lennart Poettering f1bf35a835 build: avoid trailing whitespace in feature string
(cherry picked from commit 609c302907)
2015-01-16 00:56:50 -05:00
Thomas Haller fc60813065 sd-dhcp-lease: fix copy-paste error asserting wrong function argument
(cherry picked from commit 1c6eb4e36b)
2015-01-16 00:56:50 -05:00
Lennart Poettering 304f954c4f core: watchdog bus properties cannot be both writable and constant
(cherry picked from commit 4c3f1641f1)
2015-01-16 00:56:50 -05:00
Lennart Poettering 51affe24d5 set: make set_consume() actually free the allocated string if the string already is in the set
(cherry picked from commit 575ccc1b69)

Conflicts:
	src/shared/hashmap.c
2015-01-16 00:56:50 -05:00
Dan Williams 72dec81208 sd-dhcp-client: fix REBOOT state handling
client->secs wasn't getting set in the REBOOT state, causing
an assertion.  REBOOT should work the same way as INIT, per
RFC 2131:

 secs   2  Filled in by client, seconds elapsed since client
           began address acquisition or renewal process.

REBOOT is necessary because some DHCP servers (eg on
home routers) do not hand back the same IP address unless the
'ciaddr' field is filled with that address, which DISCOVER
cannot do per the RFCs.  This leads to multiple leases
on machine reboot or DHCP client restart.

(cherry picked from commit d8d74ef06f)
2015-01-16 00:56:50 -05:00
Lennart Poettering d08997553c man: hostnamectl understands -M too
(cherry picked from commit 34b950a8d8)
2015-01-16 00:56:50 -05:00
Bastien Nocera 01be77928f keymap: Fix special keys on ThinkPad X60/X61 Tablet
KEY_DIRECTION is mapped to XF86RotateWindows, to rotate the display:
http://cgit.freedesktop.org/xkeyboard-config/commit/symbols/inet?id=ec875f6f9b7c4028e11d32b071989c682e6502bd

And F13 is mapped to XF86Tools, which is closest to the original toolbox
usage:
http://cgit.freedesktop.org/xkeyboard-config/tree/symbols/inet?id=7a2c4bed212ebbcc05f3c959aef659ce7dd31fd8#n221

(cherry picked from commit b4c72e52d2)
2015-01-16 00:56:50 -05:00
Bastien Nocera 75f1c0b023 keymap: Add support for IBM ThinkPad X41 Tablet
Scancode taken from:
http://www.thinkwiki.org/wiki/Tablet_Hardware_Buttons#Linux_Support

William Jon McCann provided the DMI match. IBM seems to have
swapped the version and model of the system:
        Manufacturer: IBM
        Product Name: 18666TU
        Version: ThinkPad X41 Tablet

(cherry picked from commit 71ed2d3871)
2015-01-16 00:56:50 -05:00
Lennart Poettering b47ddceb5f man: fix typo
(cherry picked from commit 174299e35f)
2015-01-16 00:56:49 -05:00
Lennart Poettering dca6a58907 bus: when dumping string property values escape the chars we use as end-of-line and end-of-item marks
(cherry picked from commit 27e9c5af81)
2015-01-16 00:56:49 -05:00
Mantas Mikulėnas be8ab46b27 inhibit: allow filtering --list by mode
Usually there are a few delay inhibitors all the time (NetworkManager,
Telepathy, etc.), but I'm only interested in the block ones.

(cherry picked from commit ca5447c082)
2015-01-16 00:56:49 -05:00
Michal Schmidt ef75cc1582 man: don't refer to undocumented option '--failed'
(cherry picked from commit ed80170d83)
2015-01-16 00:56:49 -05:00
Lennart Poettering 4292ae2f59 man: don't document systemctl --failed
This effectively reverts 599b6322f1, which
in turn partially reverted 4dc5b821ae.

The --failed switch is not documented on purpose, since it is redundant
due to --state=failed, which it predates. Due to that it's not
documented in --help either.

We generally try to avoid redundant interfaces, but if we need to keep
them for compatibility we do so, however remove them from documentation
to ensure they are not used in future.

The man page is now changed to include a comment about the fact that
--failed is not documented on purpose. Also, explicitly mention
--state=failed as example for --state.

(cherry picked from commit 036359ba8d)
2015-01-16 00:56:49 -05:00
Zbigniew Jędrzejewski-Szmek 335ceb0b2d man: document --failed
https://bugs.debian.org/767267
(cherry picked from commit 599b6322f1)
2015-01-16 00:56:49 -05:00
Rami Rosen 995ebb3fe3 network: fix typo
IFLA_IPTUN_LINK -> VETH_INFO_PEER

(cherry picked from commit ed7fb9cb23)
2015-01-16 00:56:49 -05:00
Lennart Poettering 5e0ee52aac sysusers: be nice and print a warning if futimens() fails
CID# 1251163

(cherry picked from commit f06863bde5)
2015-01-16 00:56:49 -05:00
Lennart Poettering ee26013e6c core: unify how we create the notify and private dbus socket
Use the same robust logic of mkdir + unlink of any existing AF_UNIX
socket, ignoring the return value, right before bind().

(cherry picked from commit f0e62e8997)
2015-01-16 00:56:49 -05:00
Lennart Poettering 8d88fbe8ab manager: cast mkdir() result to (void) to make sure coverity is quiet
Also simplify the code a bit by moving mkdir to the common path.

(cherry picked from commit 498e87d6b7)
2015-01-16 00:56:49 -05:00
Lennart Poettering 497f9feaf3 utf8: when looking at the next unichar, honour the size parameter, in utf8_is_printable_newline()
(cherry picked from commit 144b3d9e09)
2015-01-16 00:56:49 -05:00