Commit Graph
17646 Commits
Author SHA1 Message Date
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
Zbigniew Jędrzejewski-Szmek 9b5eabf5fc man: update bootup(7) for asynchronous timers.target
(cherry picked from commit d82ad85cd9)
2015-01-16 00:56:49 -05:00
Michael Chapman 7879d2f09c timer: reenable TIMER_ACTIVE timers when restarted
A timer configured with OnActiveSec will start its associated unit again
if the timer is stopped, then started. However, if the timer unit is
restarted -- with "systemctl restart", say -- this does not occur.

This commit ensures that TIMER_ACTIVE timers are re-enabled whenever the
timer is started, even if that's within a restart job.

(cherry picked from commit 779042e772)
2015-01-16 00:56:49 -05:00
Zbigniew Jędrzejewski-Szmek 5c10861b9e Accept StartTimeout* options for compatibility
Assignments of 0/none are ignored, all others are warned about.
2015-01-16 00:56:48 -05:00
Zbigniew Jędrzejewski-Szmek cdb7cc6960 Revert "build-sys: bump version number in preparation for release"
This reverts commit 9a4f7f5ef7.
2015-01-16 00:56:48 -05:00
Michal Schmidt a59400d108 shutdown: fix arguments to /run/initramfs/shutdown
Our initrd interface specifies that the verb is in argv[1].
This is where systemd passes it to systemd-shutdown, but getopt
permutes argv[]. This confuses dracut's shutdown script:
  Shutdown called with argument '--log-level'. Rebooting!

getopt can be convinced to not permute argv[] by having '-' as the first
character of optstring. Let's use it. This requires changing the way
non-option arguments (in our case, the verb) are processed.

This fixes a bug where the system would reboot instead of powering off.

(cherry picked from commit 4b5d8d0f22)
2014-11-06 16:56:47 -05:00
Michal Schmidt dd5e5ef339 shared: create files even if the SELinux policy has no context for them
The SELinux policy defines no context for some files. E.g.:
  $ matchpathcon /run/lock/subsys /dev/mqueue
  /run/lock/subsys        <<none>>
  /dev/mqueue     <<none>>

We still need to be able to create them.
In this case selabel_lookup_raw() returns ENOENT. We should then skip
setfscreatecon(), but still return success.
It was broken since c34255bdb2 ("label: unify code to make directories,
symlinks").

(cherry picked from commit 2d58aa4692)
2014-11-06 16:56:47 -05:00
Lennart Poettering 4ce940e9a4 systemctl: when invokes as "reboot -f", sync()
We do this in the clean shutdown path in shutdown.c, hence we should do
is for "reboot -f", too.

(cherry picked from commit 4a3ad39957)
2014-11-06 16:56:07 -05:00
Colin Guthrie c4b4b03e15 udev hwdb: Change error message regarding missing hwdb.bin back to debug.
When used in an initramfs, it's expected that the hwdb.bin file is
not present (it makes for a very large initramfs otherwise).

While it's nice to tell the user about this, as it's not strictly
speaking an error we really shouldn't be so forceful in our
reporting.

(cherry picked from commit 8232e39e7c)
2014-11-06 16:56:07 -05:00
Colin Guthrie dc2bcafb43 manager: Ensure user's systemd runtime directory exists.
This mirrors code in dbus.c when creating the private socket and
avoids error messages like:

systemd[1353]: bind(/run/user/603/systemd/notify) failed: No such file or directory
systemd[1353]: Failed to fully start up daemon: No such file or directory

(cherry picked from commit 0c3f25e0c1)
2014-11-06 16:56:07 -05:00
Richard W.M. Jones 67ada875bc udev: Fix parsing of udev.event-timeout kernel parameter.
(cherry picked from commit f671774f52)
2014-11-06 16:48:12 -05:00
Zbigniew Jędrzejewski-Szmek a48190c9f9 Revert "missing: remove fanotify"
This reverts commit c7e4a7bece.
2014-11-06 16:48:12 -05:00
Michal Schmidt 25bfe24d32 units: make systemd-journald.service Type=notify
It already calls sd_notify(), so it looks like an oversight.

Without it, its ordering to systemd-journal-flush.service is
non-deterministic and the SIGUSR1 from flushing may kill journald before
it has its signal handlers set up.

https://bugs.freedesktop.org/show_bug.cgi?id=85871
https://bugzilla.redhat.com/show_bug.cgi?id=1159641
(cherry picked from commit a87a38c201)

Conflicts:
	units/systemd-journald.service.in
2014-11-04 15:39:23 -05:00
Zbigniew Jędrzejewski-Szmek 0ce3f7e212 units: order sd-journal-flush after sd-remount-fs
Otherwise we could attempt to flush the journal while /var/log/ was
still ro, and silently skip journal flushing.

The way that errors in flushing are handled should still be changed to
be more transparent and robust.

(cherry picked from commit 1f1926aa5e)
2014-11-02 21:56:08 -05:00
Zbigniew Jędrzejewski-Szmek 3c6a000d5c unit: do not order timers.target before basic.target
Since commit 19f8d03783 'timer: order OnCalendar units after
timer-sync.target if DefaultDependencies=no' timers might get a
dependency on time-sync.target, which does not really belong in early
boot. If ntp is enabled, time-sync.target might be delayed until a
network connection is established.

It turns out that majority of timer units found in the wild do not
need to be started in early boot. Out of the timer units available in
Fedora 21, only systemd-readahead-done.timer and mdadm-last-resort@.timer
should be started early, but they both have DefaultDependencies=no,
so are not part of timers.target anyway. All the rest look like they
will be fine with being started a bit later (and the majority even
much later, since they run daily or weekly).

Let timers.target be pulled in by basic.target, but without the
temporal dependency. This means timer units are started on a "best
effort" schedule.

https://bugzilla.redhat.com/show_bug.cgi?id=1158206
(cherry picked from commit 3b02170360)

Conflicts:
	units/basic.target
2014-11-02 16:40:31 -05:00
Zbigniew Jędrzejewski-Szmek db2241b525 manager: do not print timing when running in test mode
(cherry picked from commit 56dacdbc1c)
2014-11-02 16:40:30 -05:00
Zbigniew Jędrzejewski-Szmek b5404292de Raise level of 'Found dependency...' lines
This way they always show up together with 'Found ordering cycle...'.
Ordering cycles are a serious error and a major pain to debug. If
quiet is enabled, only the first and the last line of output are
shown:

systemd[1]: Found ordering cycle on basic.target/start
systemd[1]: Breaking ordering cycle by deleting job timers.target/start
systemd[1]: Job timers.target/start deleted to break ordering cycle starting with basic.target/start

which isn't particularly enlightening. So just show the whole message
at the same level.

https://bugzilla.redhat.com/show_bug.cgi?id=1158206
(cherry picked from commit 14fe721b5f)
2014-11-02 16:40:30 -05:00
Colin Walters 5a9b149c96 libudev: Use correct free function
FILE * wants cleanup_fclose().

Spotted by udev hwdb segfaulting in gnome-continuous' buildroot
construction.

(cherry picked from commit ea55caa60c)
2014-11-02 16:40:30 -05:00
Joe Lawrence 3db8a5d1b3 scsi_id: fix usage spelling
s/threat/treat/g

(cherry picked from commit 85f13fce32)
2014-11-02 16:40:30 -05:00
Michael Chapman b464167132 kernel-install/90-loaderentry.install: fix cmdline parsing
A recent commit (2f3a215) changed the parsing of /proc/cmdline to use a
shell array. Unfortunately, this introduced a bug: "read -ar line"
populates the shell variable $r, not $line. This breaks installation of
new loader entries:

  # kernel-install add 3.17.1-304.fc21.x86_64 \
      /boot/vmlinuz-3.17.1-304.fc21.x86_64
  Could not determine the kernel command line parameters.
  Please specify the kernel command line in /etc/kernel/cmdline!

This commit alters the read command to correctly populate the $line
array instead.

(cherry picked from commit c008f6ee8d)
2014-11-02 16:40:30 -05:00
Zbigniew Jędrzejewski-Szmek 309ce8c253 systemd-journal-flush.service: remove "trigger" from description
This service is now synchronous, so "trigger" is misleading.

(cherry picked from commit a65b824577)
2014-11-02 16:40:30 -05:00