Commit Graph
17628 Commits
Author SHA1 Message Date
Lennart Poettering e12a9beff4 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-15 20:16:11 -05:00
Zbigniew Jędrzejewski-Szmek 09e6c7d03f man: document --failed
https://bugs.debian.org/767267
(cherry picked from commit 599b6322f1)
2015-01-15 20:15:49 -05:00
Rami Rosen d5b5713a65 network: fix typo
IFLA_IPTUN_LINK -> VETH_INFO_PEER

(cherry picked from commit ed7fb9cb23)
2015-01-15 20:15:18 -05:00
Lennart Poettering e927ee787d sysusers: be nice and print a warning if futimens() fails
CID# 1251163

(cherry picked from commit f06863bde5)
2015-01-15 20:15:18 -05:00
Lennart Poettering 4e9b64515d 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-15 20:15:18 -05:00
Lennart Poettering 82059c6f9b 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-15 20:15:18 -05:00
Lennart Poettering 6a161b2ea6 utf8: when looking at the next unichar, honour the size parameter, in utf8_is_printable_newline()
(cherry picked from commit 144b3d9e09)
2015-01-15 20:03:57 -05:00
Zbigniew Jędrzejewski-Szmek e275b4254d man: update bootup(7) for asynchronous timers.target
(cherry picked from commit d82ad85cd9)
2015-01-15 20:02:20 -05:00
Michael Chapman bfb4c47ddd 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)
2014-11-06 20:28:42 -05:00
Michal Schmidt e47a9f9727 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 20:28:42 -05:00
Lennart Poettering 8051be0e4a switch-root: explain why we don't care about base_filesystem_create() failing
(cherry picked from commit 64e18fd626)
2014-11-06 20:28:42 -05:00
Michal Schmidt f37f36832b 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 20:28:41 -05:00
Harald Hoyer 70a3ef6381 switch_root: do not fail, if base_filesystem_create() failed
Not all switch roots are like base_filesystem_create() wants them
to look like. They might even boot, if they are RO and don't have the FS
layout. Just ignore the error and switch_root nevertheless.

base_filesystem_create() should have logged, what went wrong.

(cherry picked from commit 6d0f91bf55)
2014-11-06 20:28:41 -05:00
Lennart Poettering fe357da5e6 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 20:28:41 -05:00
Lennart Poettering 2203c07490 hostnamed: introduce new "embedded" chassis type
We really don't want to get lost in adding fridge, car, plane, drone, or
whatever else, hence add a generic term "embedded" cover all the cases
where the computer is just part of something bigger, and not at the
focus of things.

(cherry picked from commit 25fa306ed5)
2014-11-06 20:26:43 -05:00
Ray Strode 4d4eff2436 login: rerun vconsole-setup when switching from vgacon to fbcon
The initialization performed by systemd-vconsole-setup is reset
when changing console drivers (say from vgacon to fbcon), so we
need to run it in that case.

See
http://lists.freedesktop.org/archives/systemd-devel/2014-October/023919.html
http://lists.freedesktop.org/archives/systemd-devel/2014-October/024423.html
http://lists.freedesktop.org/archives/systemd-devel/2014-November/024881.html

This commit adds a udev rule to make systemd-vconsole-setup get run when
the fbcon device becomes available.

(david: moved into new file 90-vconsole.rules instead of 71-seats.rules;
        build-failures are on me, not on Ray)

(cherry picked from commit f6ba8671d8)
2014-11-06 20:26:08 -05:00
Zbigniew Jędrzejewski-Szmek af49e1e5c7 units: disable job timeouts
For boot, we might kill fsck in the middle, with likely catastrophic
consequences.

On shutdown there might be other jobs, like downloading of updates for
installation, and other custom jobs. It seems better to schedule an
individual timeout on each one separately, when it is known what
timeout is useful.

Disable the timeouts for now, until we have a clearer picture of how
we can deal with long-running jobs.

(cherry picked from commit 038193efa6)

https://bugzilla.redhat.com/show_bug.cgi?id=1152220
2014-11-06 20:23:26 -05:00
Colin Guthrie de1a1440dd 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 20:23:22 -05:00
David Herrmann d135b3c6e1 udev: avoid magic constants in kernel-cmdline parsers
Lets recognize the fact that startswith() returns a pointer to the tail on
success. Use it instead of hard-coding string-lengths as magic constants.

(cherry picked from commit cfe2061add)
2014-11-06 20:23:22 -05:00
Richard W.M. Jones 86e00bfef3 udev: Fix parsing of udev.event-timeout kernel parameter.
(cherry picked from commit f671774f52)
2014-11-06 20:23:21 -05:00
Cristian Rodríguez 28ad915f79 buildsys: test-util needs -lm for fabs()
(cherry picked from commit 01acf6c3b7)
2014-11-06 20:23:21 -05:00
Michal Schmidt 5793666dce 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-06 20:23:05 -05:00
Jan Synacek 328d74f857 man/tmpfiles.d: fix typo
(cherry picked from commit ff8d1aba53)
2014-11-06 20:22:25 -05:00
Jan Synacek 34f01b8f56 localectl: fix localectl set-x11-keymap syntax description
This complements the fix in:

    commit cd4c6fb125
    Author: Jan Synacek <jsynacek@redhat.com>
    Date:   Mon Oct 20 12:43:39 2014 +0200

        man: fix localectl set-x11-keymap syntax description

(cherry picked from commit 31cf921abb)
2014-11-06 20:20:58 -05:00
Lennart Poettering f4dab44d63 journal: when dumping log data with missing COMM fields, show "unknown" instead
A small readability improvement...

(cherry picked from commit 1248e84008)
2014-11-06 20:20:43 -05:00
Lennart Poettering a2e4c94df3 journald: fix memory leak on error path
(cherry picked from commit 26d8ff0491)
2014-11-06 20:20:43 -05:00
Lennart Poettering db1bd7139d journald: fix minor memory leak
(cherry picked from commit 99d0966e75)
2014-11-06 20:20:43 -05:00
Tom Gundersen be463cec86 man: sd_event_add_post - fix typo
(cherry picked from commit f49481d0ca)
2014-11-06 20:19:48 -05:00
Zbigniew Jędrzejewski-Szmek ce5c8ab640 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-06 20:19:48 -05:00
Zbigniew Jędrzejewski-Szmek 0b0aec3a34 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)
2014-11-06 20:19:48 -05:00
Zbigniew Jędrzejewski-Szmek 1034fff787 manager: do not print timing when running in test mode
(cherry picked from commit 56dacdbc1c)
2014-11-06 20:19:48 -05:00
Zbigniew Jędrzejewski-Szmek bf50845d2c 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-06 20:19:25 -05:00
Colin Walters 7410911917 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-06 20:19:16 -05:00
Joe Lawrence 98ec0eb525 scsi_id: fix usage spelling
s/threat/treat/g

(cherry picked from commit 85f13fce32)
2014-11-06 20:19:09 -05:00
Michael Chapman c21b1d4f48 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)

https://bugzilla.redhat.com/show_bug.cgi?id=1158035
2014-11-06 20:18:16 -05:00
Zbigniew Jędrzejewski-Szmek 48a8d6bbdb systemd-journal-flush.service: remove "trigger" from description
This service is now synchronous, so "trigger" is misleading.

(cherry picked from commit a65b824577)
2014-11-06 20:18:13 -05:00
Umut Tezduyar Lindskog 0ad235ddb0 man: explain journalctl --flush correctly
(cherry picked from commit 2a97b03b3b)
2014-11-06 20:18:13 -05:00
Jan Synacek 7400d7681c core: improve error message when machine id is missing
(cherry picked from commit 86fb9ca7ae)
2014-11-06 20:18:13 -05:00
Dan Williams 87c237865b sd-dhcp6-client: fix off-by-two error in DUID length
The duid data passed by the caller does not include the DUID type,
but sd_dhcp6_client_set_duid() was treating it like it did.

(cherry picked from commit 393b6f28ec)
2014-11-06 20:18:13 -05:00
Zbigniew Jędrzejewski-Szmek c2c2394e0c man: describe all log levels in udevadm(8)
https://bugs.freedesktop.org/show_bug.cgi?id=85657
(cherry picked from commit e03234a160)
2014-11-06 20:18:13 -05:00
Zbigniew Jędrzejewski-Szmek bedfb81393 libudev: do not accept invalid log levels
Invalid log levels lead to a assert failure later on.

https://bugs.freedesktop.org/show_bug.cgi?id=85657
(cherry picked from commit ee7122c0ec)
2014-11-06 20:17:27 -05:00
Zbigniew Jędrzejewski-Szmek 84ba1738e8 libudev: modernization
This brings udev logging style a bit closer to normal systemd convention.

(cherry picked from commit fe756ed9ec)
2014-11-06 20:17:27 -05:00
Marcel Holtmann bc1912751b hwdb: Update database of Bluetooth company identifiers
(cherry picked from commit 5d20fde4a5)
2014-11-06 20:17:07 -05:00
Lennart Poettering cae7f26acc units: don't order journal flushing afte remote-fs.target
Instead, only depend on the actual file systems we need.

This should solve dep loops on setups where remote-fs.target is moved
into late boot.

(cherry picked from commit 919699ec30)
2014-11-06 20:17:07 -05:00
Lennart Poettering 9706b7533b nspawn: don't make up -1 as error code
(cherry picked from commit fddbb89c46)
2014-11-06 20:17:07 -05:00
Dave Reisner 471a21a864 shared/install: avoid prematurely rejecting "missing" units
f7101b7368 copied some logic to prevent enabling masked units, but
also added a check which causes attempts to enable templated units to
fail. Since we know the logic beyond this check will properly handle
units which truly do not exist, we can rely on the unit file state
comparison to suffice for expressing the intent of f7101b7368.

ref: https://bugs.archlinux.org/task/42616
(cherry picked from commit 0ffce503cd)
2014-11-06 20:17:07 -05:00
Ronny Chevalier 0e0f3ce5c1 shared: fix typo
(cherry picked from commit d3774a1b15)
2014-11-06 20:17:07 -05:00
Ronny Chevalier cda53bb5a5 shared: add missing includes
(cherry picked from commit 81a12ba6ec)
2014-11-06 20:17:07 -05:00
Ronny Chevalier cac66621b2 remove references of readahead
(cherry picked from commit cb607ecb84)
2014-11-06 20:17:07 -05:00
Dan Williams 25c530dfad sd-dhcp-client: clean up raw socket sd_event_source when creating new UDP socket
The raw socket sd_event_source used for DHCP server solicitations
was simply dropped on the floor when creating the new UDP socket
after a lease has been acquired.  Clean it up properly so we're
not still listening and responding to events on it.

(cherry picked from commit affaa94fc3)
2014-11-06 20:17:07 -05:00