Commit graph

643 commits

Author SHA1 Message Date
Lennart Poettering e3ad07d21c timesyncd: limit capabilities to CAP_SYS_TIME 2014-05-15 18:55:19 +02:00
Tom Gundersen 0968137439 timesyncd: start after networkd
This is needed for the network monitor to work (as it requires networkd to set up the correct directories first).
2014-05-13 12:44:22 +02:00
Tom Gundersen 7c8ec321e7 networkd: unit - add cap to load modules
Remember to drop this when the kernel gains autoloading for all netdev kinds.
2014-05-12 17:37:52 +02:00
Kay Sievers a91df40e69 timesyncd: add unit and man page 2014-04-29 09:51:53 +02:00
Tom Gundersen 3a67e927e3 networkd-wait-online: improve interoptability and enable by default
To make sure we don't delay boot on systems where (some) network links are managed by someone else
we don't block if something else has successfully brought up a link.

We will still block until all links we are aware of that are  managed by networkd have been
configured, but if no such links exist, and someone else have configured a link sufficiently
that it has a carrier, it may be that the link is ready so we should no longer block.

Note that in all likelyhood the link is not ready (no addresses/routes configured),
so whatever network managment daemon configured it should provide a similar wait-online
service to block network-online.target until it is ready.

The aim is to block as long as we know networking is not fully configured, but no longer. This
will allow systemd-networkd-wait-online.service to be enabled on any system, even if we don't
know whether networkd is the main/only network manager.

Even in the case networking is fully configured by networkd, the default behavior may not be
sufficient: if two links need to be configured, but the first is fully configured before the
second one appears we will assume the network is up. To work around that, we allow specifying
specific devices to wait for before considering the network up.

This unit is enabled by default, just like systemd-networkd, but will only be pulled in if
anyone pulls in network-online.target.
2014-04-24 00:23:07 +02:00
Kay Sievers 0fbedd1fdc remove bus-driverd, the interface is now handled natively by bus-proxyd 2014-04-22 19:31:26 +02:00
Tom Gundersen a555350d47 networkd: order after udev kernel socket
Otherwise we will not be able to queuery whether devices are initialized on kdbus enabled systems.
2014-04-19 22:13:49 +02:00
Kay Sievers 4851ac4526 bus: provide org.freedesktop.systemd1.busname for systemd --user 2014-03-26 03:38:48 +01:00
Tom Gundersen 6c7c89dfc6 networkd: add CapabilityBoundingSet 2014-03-24 17:13:24 +01:00
Lennart Poettering 48791a98be units: networkd shouldn't have PrivateTmp= set, since it runs in early-boot
/tmp is only available in later boot, and we shouldn't create private
subdirs in it hence, while we are still in early boot.
2014-03-24 16:48:39 +01:00
Lennart Poettering c2c13f2df4 unit: turn off mount propagation for udevd
Keep mounts done by udev rules private to udevd. Also, document how
MountFlags= may be used for this.
2014-03-20 04:16:39 +01:00
Lennart Poettering f21a71a907 core: enable PrivateNetwork= for a number of our long running services where this is useful 2014-03-19 23:25:28 +01:00
Lennart Poettering d99a705296 units: make use of PrivateTmp=yes and PrivateDevices=yes for all our long-running daemons 2014-03-19 19:09:00 +01:00
Daniel Mack 5892a914d1 busname: introduce Activating directive
Add a new config 'Activating' directive which denotes whether a busname
is actually registered on the bus. It defaults to 'yes'.

If set to 'no', the .busname unit only uploads policy, which will remain
active as long as the unit is running.
2014-03-19 02:25:36 +01:00
Hendrik Brueckner fc6c7fe9be getty: Start getty on 3270 terminals available on Linux on System z
Add the first 3270 terminal device that is associated with the Linux preferred
console to the list of virtualization consoles.  This is required to
automatically start a getty if the conmode=3270 kernel parameter is specified
for Linux on z/VM instances.  Note that a queued upstream patch also enable
the 3270 terminal device if it is associated with the Linux preferred console.
How

To successfully start agetty on a 3270 terminal, a change in the agetty
parameter order is required.  Previously, agetty would started like this:

    /sbin/agetty --keep-baud 3270/tty1 115200,38400,9600 TERM

The agetty program interprets the "3270/tty1" as baud rate and fails to start
with the "bad speed: 3270/tty1" error message.  Fixing this in agetty is more
complex rather than reordering the command line parameters like this:

    /sbin/agetty --keep-baud 115200,38400,9600 3270/tty1 TERM

According to agetty sources and "agetty --help", agetty accepts the "tty",
"baudrate tty", and "tty baudrate" specifications.

P.S. The "tty: Set correct tty name in 'active' sysfs attribute" introduces
     a change to display the terminal device which is associated with the
     Linux preferred console.  This change helps to let systemd handle this
     particular case only.  Without the changes of this commit, no additional
     3270 terminal device can be managed by systemd.

     https://git.kernel.org/cgit/linux/kernel/git/gregkh/tty.git/commit/?id=723abd87f6e536f1353c8f64f621520bc29523a3
2014-03-13 10:42:26 +01:00
Kay Sievers d5ce683c07 units: remove "AllowUser=root own", the bus owner can always own names 2014-03-08 19:38:06 +01:00
Daniel Mack fe8d029277 units: set 'AllowUser=root own' and 'AllowWorld=talk' own for all .busname files 2014-03-07 19:19:02 +01:00
Thomas Bächler 6c49212741 units: Do not unescape instance name in systemd-backlight@.service
The instance name is never escaped in the udev rule, but unescaped in the unit.
This results in the following error message on Asus boards:

  Failed to get backlight or LED device 'backlight:eeepc/wmi': No such file or directory
2014-03-07 00:30:56 -05:00
Lennart Poettering 9533ad1f42 units: don't use the word 'Reboot' for Startup, but simply 'Boot' 2014-03-06 05:04:51 +01:00
Lennart Poettering d1a6f44125 units: properly capitalize the unit description 2014-03-06 05:04:51 +01:00
Zbigniew Jędrzejewski-Szmek 1ae383a8a3 Use /var/run/dbus/system_bus_socket for the D-Bus socket 2014-02-25 21:26:42 -05:00
Zbigniew Jędrzejewski-Szmek 7143555ce8 units/serial-getty@.service: add [Install] section
This makes it easier to manually enable and disable
specific gettys, and also mirrors getty@.service.

http://lists.freedesktop.org/archives/systemd-devel/2014-February/017329.html
2014-02-24 08:07:34 -05:00
Jason A. Donenfeld c4a0b20c7a install: do not statically enable systemd-networkd
[tomegun: pruned the commit message as not to contradict the follow-up commit]
2014-02-21 14:37:53 +01:00
Zbigniew Jędrzejewski-Szmek 8f9c6fe5ff units: systemd-logind fails hard without dbus
That is, without --enable-kdbus and kdbus running.

With --enable-kdbus things are more complicated, because dbus might be
necessary, if kdbus is missing at runtime. If it is not necessary,
the socket will be started, which is not imporant, but not the service.
2014-02-14 19:00:32 -05:00
Lennart Poettering c480d2f8bc units: make use of nspawn's --keep-unit switch in systemd-nspawn@.service 2014-02-11 21:13:51 +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
Tom Gundersen bcbca8291f networkd: don't hard depend on system bus
We may not have a dbus daemon in the initrd (until we can rely on kdbus). In
this case, simply ignore any attempts at using the bus. There is only one user
for now, but surely more to come.

In order to work reliably in the real root without kdbus, but at the same time
don't delay boot when kdbus is in use, order ourselves after dbus.service.
2014-01-18 01:56:41 +01:00
Lennart Poettering 02ebe178a2 units: drop [Install] section from multi-user.target and graphical.target
They were supposed to make it easy to make the default.target a symlink
to these targets, but this was never advertised and we have a better
command for this now in "systemctl set-default". Since the install
section makes the output of "systemctl list-unit-files" confusing (since
it makes the units appear as "disabled"), let's drop the sections.
2014-01-17 20:27:35 +01:00
Tom Gundersen 1346b1f038 sd-dhcp-client/networkd: add transient hostname support 2014-01-16 20:32:08 +01:00
Zbigniew Jędrzejewski-Szmek d8160f21fd Improve messages about user mode a bit 2014-01-08 22:15:27 -05:00
Kay Sievers 8b255ecd99 pam_systemd: export DBUS_SESSION_BUS_ADDRESS 2014-01-08 18:11:37 +08:00
Kay Sievers 54142c6af1 bus-driverd: support user mode 2014-01-08 08:38:39 +08:00
Kay Sievers 7ca7b61f70 bus-proxyd: support --user bus address 2014-01-08 08:38:39 +08:00
Kay Sievers 1bc86acd10 bus-proxyd: --user -- add Accept=yes to socket 2014-01-07 06:44:55 +08:00
Kay Sievers fccd44ec3a core: --user -- add basic.target an sort against it like --system does 2014-01-07 01:35:25 +08:00
Kay Sievers 734624951b bus-proxyd: fix socket path 2014-01-07 01:33:58 +08: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
Marc-Antoine Perennou 08c51903fb gitignore: add back user@.service 2013-12-28 15:19:25 +01:00
Zbigniew Jędrzejewski-Szmek 4acbce7979 build-sys: fix generation of user@.service 2013-12-27 12:12:41 -05:00
Mantas Mikulėnas 3dc9f55d6e units: user@.service: fix user bus path 2013-12-27 12:12:41 -05: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
Lennart Poettering 9a8112f5e9 units: systemd-machined now exits on idle and we shouldn't try to restart it then 2013-12-23 20:37:03 +01:00
Lennart Poettering 5326b03f30 units: limit caps for bus proxyd and driverd services 2013-12-23 20:37:00 +01:00
Lennart Poettering 0721804f03 bus: send status message from proxyd to systemd about client we are working for 2013-12-21 05:15:09 +01:00
Lennart Poettering ccf22d4a10 units: when spawning a getty configure TERM explicitly
This way we can make use of our logic to automatically determine an
appropriate TERM for a specific tty.
2013-12-18 18:21:28 +01:00
Lennart Poettering 74f9e0f203 units: run systemd-networkd.service only if CAP_NET_ADMIN capability is around
This has the effect that systemd-networkd won't run in containers
without network namespacing wher CAP_NET_ADMIN is (usually) not
available. It will still run in containers with network namespacing on
(where CAP_NET_ADMIN is usually avilable).

We might remove this condition check again if networkd provides services
to apps that also are useful in containers lacking network namespacing,
however, as long as it doesn't it should be handled like udevd and be
excluded in such containers.
2013-12-18 18:21:27 +01:00
Lennart Poettering 15e913230c bus: install unit files for new driver service 2013-12-17 15:42:33 +01:00
Kay Sievers eca7a27add bus: fix typo in systemd-bus-proxyd 2013-12-16 23:25:32 +01:00
Lennart Poettering 77e96a6247 units: properly make bus proxy socket of type Accept=yes 2013-12-16 21:06:57 +01:00