Commit graph

1217 commits

Author SHA1 Message Date
Tom Gundersen be32eb9b7f net-config: start split out matching and parsing logic
Move this to src/share/net-util.c, so it can be used elsewhere.
2013-11-04 23:00:12 +01:00
David Herrmann 0a8da8305a rules: load path_id on DRM devices
The path_id-builtin provides useful unique aliases for DRM devices. If we
want to configure DRM render-nodes for compositors, we want to avoid
storing the whole sys-path in configuration files. Hence, allow users to
store the short PATH_ID instead.

Load path_id-builtin unconditionally on DRM devices now to always provide
this alias.
2013-11-03 13:12:13 +01:00
Simon Peeters b028f3e410 hostnamectl: port to sd-bus
Kay:
 - rebase to new transport logic
 - replaced iteration macro with property map
2013-11-02 02:15:54 +01:00
Ronny Chevalier d74ab85216 zsh-completion: add systemd-run 2013-10-30 22:45:18 -04:00
Lennart Poettering 04d3927924 machinectl: add new command to spawn a getty inside a container 2013-10-31 01:43:38 +01:00
Lennart Poettering 4ba9328022 nspawn: split out pty forwaring logic into ptyfwd.c 2013-10-31 01:43:38 +01:00
Kay Sievers 4d7859d173 localectl: port to libsystemd-bus 2013-10-30 22:50:09 +01:00
Thomas Hindoe Paaboel Andersen a281d9c785 timedatectl: port to sd-bus 2013-10-30 21:13:46 +01:00
Lennart Poettering a7893c6b28 bus: add API call to create bus connection to the system bus of local containers
Also, add support for this to machinectl, so that we can enumerate the
machines that run inside a container. We must go deeper!
2013-10-30 15:37:02 +01:00
Tom Gundersen 3e137a1b9a udev: link-config - let udevd set the ifname 2013-10-30 15:36:04 +01:00
Tom Gundersen a1da85830b machinectl: port to sd-bus 2013-10-30 03:40:23 +01:00
Kay Sievers 77632684f3 build-sys: remove default CFLAGS assignment 2013-10-30 02:39:32 +01:00
Lennart Poettering c335068380 machined: port over to libsystemd-bus 2013-10-30 02:08:57 +01:00
Tom Gundersen 3aeb37bc4f rtnl: move set_link_properties to rtnl-utils 2013-10-29 21:26:22 +01:00
Tom Gundersen 5fde13d748 udev: link-config - add proper parsing 2013-10-29 14:17:57 +01:00
Tom Gundersen 0b99c9f8f0 udev: builtin - rename net_link to net_setup_link
Also add shell completions.
2013-10-29 14:17:57 +01:00
Tom Gundersen 9dc670ea76 network: move configuration to /etc/systemd/network
This is private configuraiton, so let's not pollute the namespace (and hence make Debian happy :) ).
2013-10-29 14:17:57 +01:00
Tom Gundersen 3716e8c99c udev: don't mix static and dynamic libs 2013-10-28 18:58:19 +01:00
Tom Gundersen 16b9b87aee udev: link-config - add mac address policy
This introduces a new key MACAddressPolicy.

The possible policies are 'persistent' and 'random'.

'persistent' will do nothing if the current address is the hardware address,
but if the hardware does not have an address (or another address is set for
whatever reason), we will generate an address which will be random, but
persistent between boots (based on machineid and persistent netif name).

'random' will do nothing if the kernel already set a random address, otherwise
it will generate a random one and use that instead.

This patch sets MACAddressPolicy=persistent in the default .link file.
2013-10-28 18:10:23 +01:00
Tom Gundersen daeb71a36a udev: link-config - move naming policy from udev rules
This introduces a new key NamePolicy, which takes an ordered list of naming
policies. The first successful one is applide. If all fail the value of Name
(if any) is used.

The possible policies are 'onboard', 'slot', 'path' and 'mac'.

This patch introduces a default link file, which replaces the equivalent udev
rule.
2013-10-28 01:18:04 +01:00
Tom Gundersen 43b3a5ef61 udev: link-config: add rtnl support
This adds support for setting the mac address, name and mtu.

Example:

[Link]
MTU=1450
MACAddress=98:76:54:32:10:ab
Name=wireless0
2013-10-27 22:23:58 +01:00
Tom Gundersen 65f568bbeb libsystemd-rtnl: add a rtnetlink library
This is intentionally as similar to sd-bus as possible. While it
would be simple to export it, the intentions is to keep this
internal (at least for the forseeable future).

Currently only synchronous communication is implemented
2013-10-27 22:18:34 +01:00
Tom Gundersen a501033335 udev: link-config: add ethtool support
This adds support for setting the link speed, duplex and WakeOnLan
settings.

Example:

[Link]
SpeedMBytes=100
Duplex=half
WakeOnLan=magic
2013-10-26 22:09:20 +02:00
Tom Gundersen af6f0d422c udev: add network link configuration tool
This tool applies hardware specific settings to network devices before they
are announced via libudev.

Settings that will probably eventually be supported are MTU, Speed,
DuplexMode, WakeOnLan, MACAddress, MACAddressPolicy (e.g., 'hardware',
'synthetic' or 'random'), Name and NamePolicy (replacing our current
interface naming logic). This patch only introduces support for
Description, as a proof of concept.

Some of these settings may later be overriden by a network management
daemon/script. However, these tools should always listen and wait on libudev
before touching a device (listening on netlink is not enough). This is no
different from how things used to be, as we always supported changing the
network interface name from udev rules, which does not work if someone
has already started using it.

The tool is configured by .link files in /etc/net/links/ (with the usual
overriding logic in /run and /lib). The first (in lexicographical order)
matching .link file is applied to a given device, and all others are ignored.

The .link files contain a [Match] section with (currently) the keys
MACAddress, Driver, Type (see DEVTYPE in udevadm info) and Path (this
matches on the stable device path as exposed as ID_PATH, and not the
unstable DEVPATH). A .link file matches a given device if all of the
specified keys do. Currently the keys are treated as plain strings,
but some limited globbing may later be added to the keys where it
makes sense.

Example:

/etc/net/links/50-wireless.link
[Match]
MACAddress=98:f2:e4:42:c6:92
Path=pci-0000:02:00.0-bcma-0
Type=wlan

[Link]
Description=The wireless link
2013-10-26 22:09:20 +02:00
Thomas Hindoe Paaboel Andersen 048ecf5b84 analyze: port to sd-bus 2013-10-25 20:59:01 +02:00
Zbigniew Jędrzejewski-Szmek d8c9d3a468 systemd: use unit name in PrivateTmp directories
Unit name is used whole in the directory name, so that the unit name
can be easily extracted from it, e.g. "/tmp/systemd-abcd.service-DEDBIF1".

https://bugzilla.redhat.com/show_bug.cgi?id=957439
2013-10-22 22:54:09 -04:00
Tom Gundersen 0fb0c56f52 inhibit: port to sd-bus 2013-10-22 13:00:54 +01:00
Kay Sievers b0770377ab analyze: systemd-analyze.c -> analyze.c 2013-10-22 13:55:50 +02:00
Kay Sievers 8d45130966 localed: port from libdbus to libsystemd-bus 2013-10-22 13:25:17 +02:00
Kay Sievers ca2871d9b0 bus: remove static introspection file export 2013-10-21 00:41:26 +02:00
Kay Sievers 145d22584f build-sys: unify foo_CFLAGS = usage and add explaining comments
Always add the default AM_CFLAGS first.

If variables are used in conditionals, the default assignment
of AM variables is disabled, even when the conditional is not
in use; foo_CFLAGS = $(AM_CFLAGS) is needed, even when it looks
like a no-op.
2013-10-20 17:34:15 +02:00
Colin Walters a54156a297 Revert "build-sys: move journalctl CFLAGS= to one line"
This reverts commit e5d5aa1d0f4e143f12f5e00ca072547369d37e53; it
breaks if !HAVE_QRENCODE since then we aren't using $(AM_CFLAGS) for
journalctl.
2013-10-20 09:53:05 -04:00
Kay Sievers e5d5aa1d0f build-sys: move journalctl CFLAGS= to one line 2013-10-20 01:00:23 +02:00
Tom Gundersen a7623afb7a fsck-root: only run when requested in fstab
fsck-root is redundant in case an initrd is used, or in case the rootfs
is never remounted 'rw', so the new default is the correct behavior for
most users. For the rest, they should enable it in fstab.
2013-10-19 12:23:17 +02:00
Colin Walters 4ca302b967 build-sys: Honor CFLAGS for journalctl again
Regression from e905a45681.
2013-10-18 10:13:52 -04:00
Lennart Poettering 58c5d4215a build-sys: fix += vs = in Makefile 2013-10-18 14:21:36 +02:00
Tom Gundersen 89456fcee4 update-utmp: port to sd-bus
Change from GetUnit to LoadUnit to make sure we can detect the current legacy
runlevel, even if nothing loaded the legacy target files yet.
2013-10-18 06:21:26 +02:00
Lennart Poettering 96c374d0a5 socket-proxyd: rename from saproxy
The thing is a daemon, hence needs a "d" prefix. Also, we tend to not
abbreviate names of background components unnecessarily, since they are
not primary commands people type. Then, the fact that this thing does
socket actviation is mostly in implementationd detail for the proxy.

Also, do some minor indenting clean-ups and other code updates.
2013-10-18 02:58:47 +02:00
Lennart Poettering e905a45681 build-sys: drop a number CFLAGS assignments in Makefile that are pointless 2013-10-18 02:37:38 +02:00
Tom Gundersen b75b4db0af initctl: port to sd-bus 2013-10-18 01:34:55 +02:00
Tom Gundersen d05f1cae2f cgroup-agent: port to sd-bus 2013-10-18 00:55:24 +02:00
Tom Gundersen 0c842e0ac0 fsck: port to sd-bus 2013-10-18 00:55:24 +02:00
Lennart Poettering 66a4c743c0 hostnamed: port over from libdbus to libsystemd-bus 2013-10-18 00:49:01 +02:00
Lennart Poettering aacf3b483b api: unify some common bits used by public systemd APIs 2013-10-16 17:01:26 +02:00
Lennart Poettering 40ca29a137 timedated: use libsystemd-bus instead of libdbus for bus communication
Among other things this also adds a few things necessary for the change:

- Considerably more powerful error returning APIs in libsystemd-bus

- Adapter for connecting an sd_bus to an sd_event

- As I reworked the PolicyKit logic to the new library I also made it
  asynchronous, so that PolicyKit requests of one user cannot block out
  another user anymore.

- We always use the macro names for common bus error. That way it is
  harder to mistype them since the compiler will notice
2013-10-16 06:15:02 +02:00
David Strauss d1b38fac57 Rename sabridge to saproxy to be less cryptic 2013-10-15 17:00:18 -07:00
David Strauss 912b54ad47 Add sabridge for socket activation of traditional daemons 2013-10-15 16:13:30 -07:00
Kay Sievers b0130bf608 build-sys: libsystemd-id128 - get rid of the needless selinux linking (again)
$ ldd libsystemd-id128.so
        linux-vdso.so.1 =>  (0x00007fffce377000)
        libselinux.so.1 => /lib64/libselinux.so.1 (0x00007f4de1fc1000)
        librt.so.1 => /lib64/librt.so.1 (0x00007f4de1db9000)
        libdl.so.2 => /lib64/libdl.so.2 (0x00007f4de1bb4000)
        libc.so.6 => /lib64/libc.so.6 (0x00007f4de17f5000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f4de2406000)
        libpcre.so.1 => /lib64/libpcre.so.1 (0x00007f4de158f000)
        libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f4de1371000)

$ ldd libsystemd-id128.so
        linux-vdso.so.1 =>  (0x00007fff25187000)
        libdl.so.2 => /lib64/libdl.so.2 (0x00007f41a3964000)
        libc.so.6 => /lib64/libc.so.6 (0x00007f41a35a5000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f41a3d89000)
2013-10-15 02:29:29 +02:00
Kay Sievers 9cada1952a build-sys: libudev - get rid of the needless selinux linking (again) 2013-10-15 02:11:56 +02:00
Lennart Poettering 3990f24765 rfkill: add new rfkill tool to save/restore rfkill state across reboots
This works analogous to the existing backlight and random seed services
2013-10-14 04:31:49 +02:00