1
0
mirror of https://github.com/systemd/systemd.git synced 2024-10-28 11:55:44 +03:00
Commit Graph

1218 Commits

Author SHA1 Message Date
Tom Gundersen
eb27aeca24 networkd: dhcpv4 - add notion of 'CriticalConnection'
These connections are never torn down, even when the DHCP specifications say that
they should be. This is useful/necessary when the rootfs (or another critical fs)
is mounted over this network connection, and dataloss would result if the connection
is lost.

This option defaults to off, but our initrd generator (TBD) will enable it when
applicable.
2014-01-30 14:30:39 +01:00
Lennart Poettering
58ea275a68 core: introduce new KillMode=mixed which sends SIGTERM only to the main process, but SIGKILL to all daemon processes
This should fix some race with terminating systemd --user, where the
system systemd instance might race against the user systemd instance
when sending SIGTERM.
2014-01-29 13:42:06 +01:00
Zbigniew Jędrzejewski-Szmek
38180c8568 man: remove erroneous history section 2014-01-28 22:02:34 -05:00
Zbigniew Jędrzejewski-Szmek
d450b6f2a9 manager: add systemd.show_status=auto mode
When set to auto, status will shown when the first ephemeral message
is shown (a job has been running for five seconds). Then until the
boot or shutdown ends, status messages will be shown.

No indication about the switch is done: I think it should be clear
for the user that first the cylon eye and the ephemeral messages appear,
and afterwards messages are displayed.

The initial arming of the event source was still wrong, but now should
really be fixed.
2014-01-27 23:17:03 -05:00
Zbigniew Jędrzejewski-Szmek
65b3903ff5 journal: guarantee async-signal-safety in sd_journald_sendv
signal(7) provides a list of functions which may be called from a
signal handler. Other functions, which only call those functions and
don't access global memory and are reentrant are also safe.
sd_j_sendv was mostly OK, but would call mkostemp and writev in a
fallback path, which are unsafe.

Being able to call sd_j_sendv in a async-signal-safe way is important
because it allows it be used in signal handlers.

Safety is achieved by replacing mkostemp with open(O_TMPFILE) and an
open-coded writev replacement which uses write. Unfortunately,
O_TMPFILE is only available on kernels >= 3.11. When O_TMPFILE is
unavailable, an open-coded mkostemp is used.

https://bugzilla.gnome.org/show_bug.cgi?id=722889
2014-01-27 23:17:02 -05:00
Christian Seiler
b4a11878f2 cryptsetup: Support key-slot option
Debian recently introduced the option key-slot to /etc/crypttab to
specify the LUKS key slot to be used for decrypting the device. On
systems where a keyfile is used and the key is not in the first slot,
this can speed up the boot process quite a bit, since cryptsetup does
not need to try all of the slots sequentially. (Unsuccessfully testing
a key slot typically takes up to about 1 second.)

This patch makes systemd aware of this option.

Debian bug that introduced the feature:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=704470
2014-01-26 13:24:01 +01:00
Tom Gundersen
54abf461d6 networkd: add basic VLAN support 2014-01-25 11:25:17 +01:00
Tom Gundersen
52433f6b65 networkd: add basic bonding support
Refactor bridging support to be generic netdev support and extend it to
cover bonding as well.
2014-01-22 17:56:49 +01:00
Lennart Poettering
3736955368 man: document message timestamping/sequence number API 2014-01-22 11:44:54 +01:00
Lennart Poettering
7f112f50fe exec: introduce PrivateDevices= switch to provide services with a private /dev
Similar to PrivateNetwork=, PrivateTmp= introduce PrivateDevices= that
sets up a private /dev with only the API pseudo-devices like /dev/null,
/dev/zero, /dev/random, but not any physical devices in them.
2014-01-20 21:28:37 +01:00
Tom Gundersen
0de638530c networkd: dhcp - by default ignore the MTU 2014-01-18 21:19:09 +01:00
Tom Gundersen
1346b1f038 sd-dhcp-client/networkd: add transient hostname support 2014-01-16 20:32:08 +01:00
Tom Gundersen
4f882b2a50 sd-dhcp-client/networkd: add interface MTU support 2014-01-16 01:44:19 +01:00
Lennart Poettering
ac3efa8ac6 systemctl: introduce new "import-environment" command
This may be used in graphical session start-up scripts to upload
environment variables such as $DISPLAY into the systemd manager easily.
2014-01-15 20:16:20 +01:00
Tom Gundersen
5be4d38e31 networkd: DHCPv4 - allow opting out of using DNS servers
Setting UseDNS=no will ignore any received DNS servers.
2014-01-13 21:54:57 +01:00
Tom Gundersen
6bb648a16a libsystemd-bus: rename to libsystemd
Documentation was updated to refer to either 'libsystemd' or 'sd-bus' in place
of libsystemd-bus.
2014-01-13 18:54:19 +01:00
Zbigniew Jędrzejewski-Szmek
708c143c7c man: add busctl(1) 2014-01-11 23:45:17 -05:00
Zbigniew Jędrzejewski-Szmek
348ced9097 journald: do not free space when disk space runs low
Before, journald would remove journal files until both MaxUse= and
KeepFree= settings would be satisfied. The first one depends (if set
automatically) on the size of the file system and is constant.  But
the second one depends on current use of the file system, and a spike
in disk usage would cause journald to delete journal files, trying to
reach usage which would leave 15% of the disk free. This behaviour is
surprising for the user who doesn't expect his logs to be purged when
disk usage goes above 85%, which on a large disk could be some
gigabytes from being full. In addition attempting to keep 15% free
provides an attack vector where filling the disk sufficiently disposes
of almost all logs.

Instead, obey KeepFree= only as a limit on adding additional files.
When replacing old files with new, ignore KeepFree=. This means that
if journal disk usage reached some high point that at some later point
start to violate the KeepFree= constraint, journald will not add files
to go above this point, but it will stay (slightly) below it. When
journald is restarted, it forgets the previous maximum usage value,
and sets the limit based on the current usage, so if disk remains to
be filled, journald might use one journal-file-size less on each
restart, if restarts happen just after rotation. This seems like a
reasonable compromise between implementation complexity and robustness.
2014-01-11 16:54:59 -05:00
Zbigniew Jędrzejewski-Szmek
ea18a4b57e journalctl: allow globbing in --unit and --user-unit
This is a continuation of e3e0314b systemctl: allow globbing in commands
which take multiple unit names.

Multiple patterns can be specified, as separate arguments, or as one argument
with patterns seperated by commas.

If patterns are given, at least one unit must be matched (by any of the patterns).
This is different behaviour than systemctl, but here it is necessary because
otherwise anything would be matched, which is unlikely to be the intended
behaviour.

https://bugs.freedesktop.org/show_bug.cgi?id=59336
2014-01-11 10:07:22 -05:00
Zbigniew Jędrzejewski-Szmek
3860bb6dbf man: clarify sd_bus_e_get_errno with NULL arg 2014-01-10 09:10:27 -05:00
Zbigniew Jędrzejewski-Szmek
c5b37953b7 man: mention which variables will be expanded in ExecStart 2014-01-09 22:23:42 -05:00
Zbigniew Jędrzejewski-Szmek
d30ec1f5df man: document label escaping functions 2014-01-07 23:05:30 -05:00
Zbigniew Jędrzejewski-Szmek
5485de1edb man: fix bogus description of sd_bus_creds_has_*_cap 2014-01-07 22:28:04 -05:00
Zbigniew Jędrzejewski-Szmek
71365a7754 man: document sd-bus error functions 2014-01-07 21:51:47 -05:00
Zbigniew Jędrzejewski-Szmek
4cf8496d0a man: document some more bus functions 2014-01-05 00:43:22 -05:00
Tom Gundersen
b3070dc025 networkd: refuse to use .network files with missing Address/Gateway key
These keys are mandatory in [Address]/[Route] sections. Otherwise, we
hit an assert:

ens3: setting addresses
Assertion 'address->family == 2 || address->family == 10' failed at /build/amd64-generic/tmp/portage/sys-apps/systemd-9999-r1/work/systemd-9999/src/network/networkd-address.c:137, function address_configure(). Aborting.

Reported-by: Alex Polvi <alex.polvi@coreos.com>

At the same time make sure Route's Destination and Gateway uses the same address family.
2014-01-05 00:32:31 +01:00
Thomas Hindoe Paaboel Andersen
3563b896da man: typo fix 2014-01-04 23:21:13 +01:00
Tom Gundersen
d69b12ac8a Revert "net-util: add support for Type=ethernet"
This reverts commit 4cd1214db6.

This may still be fixed in the kernel, revert this for now until
we see how it all shakes out.
2014-01-04 15:21:58 +01:00
Zbigniew Jędrzejewski-Szmek
cd6d5e1c76 man: document a batch of bus functions 2014-01-04 00:15:01 -05:00
Tom Gundersen
efb8612f9e man: networkd - document DHCP option 2014-01-03 21:07:01 +01:00
Tom Gundersen
4cd1214db6 net-util: add support for Type=ethernet
When DEVTYPE is not set for a nic, it means it is a wired/ethernet
device.
2014-01-03 20:55:23 +01:00
Zbigniew Jędrzejewski-Szmek
8181565124 tmpfiles: rename --unsafe to --boot
As suggested by Kay, it is better to describe what is done,
not what might happen.
2013-12-30 13:01:27 -05:00
Zbigniew Jędrzejewski-Szmek
3cf148f307 man: expand on some more subtle points in systemd.socket(5)
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=727708#1694
2013-12-30 00:17:16 -05:00
Zbigniew Jędrzejewski-Szmek
892213bf1f acticate: rename --environment to --setenv
Nspawn has --setenv, and systemd itself accepts systemd.setenv.
It is nice to have the same parameter name everywhere.

Old name is accepted, but not advertised.
2013-12-30 00:17:15 -05:00
Michał Górny
5486855f7d man: include autoconf snippet in daemon(7)
https://bugs.freedesktop.org/show_bug.cgi?id=40446
2013-12-27 23:45:24 -05:00
Zbigniew Jędrzejewski-Szmek
a9a305332b man: add a note about propagating signals 2013-12-27 15:28:26 -05:00
Zbigniew Jędrzejewski-Szmek
12b25f3001 man: fix Type= reference v2
grawity:

  It looks like the old version _was_ correct – the default value will
  be "Type=dbus" if the service has a BusName set.

  Suggested change: "if neither Type= nor BusName= is specified"
2013-12-27 01:20:33 -05:00
Marcos Felipe Rasia de Mello
3d2df82d61 man: fix Type= reference
Simple man page fix attached.

--
Marcos

From 268d10a2f8769fd1dcb9440670af15ac02c5df89 Mon Sep 17 00:00:00 2001
From: Marcos Mello <marcosfrm@gmail.com>
Date: Thu, 26 Dec 2013 17:19:04 -0200
Subject: [PATCH 1/1] man: fix Type= reference
2013-12-26 16:01:28 -05:00
Zbigniew Jędrzejewski-Szmek
e3e0314b56 systemctl: allow globbing in commands which take multiple unit names 2013-12-26 13:24:36 -05:00
Zbigniew Jędrzejewski-Szmek
91f0ac7d40 man: fix description of is-enabled returned value 2013-12-26 11:24:42 -05:00
Zbigniew Jędrzejewski-Szmek
72ebbf3450 man: document fail/nofail, auto/noauto
Also s/filesystem/file system/ in a few places.
2013-12-25 23:22:05 -05:00
Jan Engelhardt
e0e009c067 man: grammar and wording improvements
This is a recurring submission and includes corrections to:
- missing words, preposition choice.
- change of /lib to /usr/lib, because that is what most distros are
  using as the system-wide location for systemd/udev files.
2013-12-25 22:53:46 -05:00
Jan Engelhardt
b040723ea4 man: improvements to comma placement
This is a recurring submission and includes corrections to:
comma placement.
2013-12-25 22:53:46 -05:00
Jan Engelhardt
494a668218 man: resolve word omissions
This is a recurring submission and includes corrections to:
word omissions and word class choice.
2013-12-25 22:53:45 -05:00
Lennart Poettering
99e0f83e0b man: add missing sd_bus_message_get_cookie man page fie 2013-12-25 18:05:48 +01:00
Lennart Poettering
d9416f8a82 man: document sd_bus_message_get_cookie() 2013-12-25 18:04:04 +01:00
Zbigniew Jędrzejewski-Szmek
c4708f1323 tmpfiles: introduce the concept of unsafe operations
Various operations done by systemd-tmpfiles may only be safely done at
boot (e.g. removal of X lockfiles in /tmp, creation of /run/nologin).
Other operations may be done at any point in time (e.g. setting the
ownership on /{run,var}/log/journal). This distinction is largely
orthogonal to the type of operation.

A new switch --unsafe is added, and operations which should only be
executed during bootup are marked with an exclamation mark in the
configuration files. systemd-tmpfiles.service is modified to use this
switch, and guards are added so it is hard to re-start it by mistake.

If we install a new version of systemd, we actually want to enforce
some changes to tmpfiles configuration immediately. This should now be
possible to do safely, so distribution packages can be modified to
execute the "safe" subset at package installation time.

/run/nologin creation is split out into a separate service, to make it
easy to override.

https://bugzilla.redhat.com/show_bug.cgi?id=1043212
https://bugzilla.redhat.com/show_bug.cgi?id=1045849
2013-12-24 15:48:06 -05:00
Zbigniew Jędrzejewski-Szmek
ef72c1f06e man,units: tmpfiles.d(5) cleanup
Condition for /lib (necessary for split /usr) was missing from the unit.

Some changes which were done in tmpfiles.d(5) were not carried over to
systemd-tmpfiles(1).

Also use markup where possible.
2013-12-24 15:48:06 -05:00
Zbigniew Jędrzejewski-Szmek
6096dfd616 delta: if prefix is specified, only show overrides there
systemd-delta /run/systemd/system will show all unit overrides
in /run, etc.
2013-12-22 22:54:15 -05:00
Lennart Poettering
09812eb764 sd-daemon: introduce sd_watchdog_enabled() for parsing $WATCHDOG_USEC
Also, introduce a new environment variable named $WATCHDOG_PID which
cotnains the PID of the process that is supposed to send the keep-alive
events. This is similar how $LISTEN_FDS and $LISTEN_PID work together,
and protects against confusing processes further down the process tree
due to inherited environment.
2013-12-22 22:19:03 +01:00