Systemd/src
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
..
ac-power unit: add ConditionACPower= 2012-12-31 21:24:26 +01:00
activate replace tabs with spaces in various files 2013-07-02 23:06:22 -04:00
analyze analyze: port to sd-bus 2013-10-25 20:59:01 +02:00
ask-password util: rename parse_usec() to parse_sec() sinds the default unit is seconds 2013-04-03 20:12:57 +02:00
backlight kerne-command-line: introduce option 'systemd.restore_state' 2013-10-19 00:46:10 +02:00
binfmt fileio: in envfiles, do not skip lines following empty lines 2013-04-13 20:24:39 -04:00
boot support acpi firmware performance data (FPDT) 2013-09-24 15:43:41 +02:00
bootchart Fix for SIGSEGV in systemd-bootchart on short-living processes 2013-10-15 09:40:34 -04:00
cgls cgroup: when referencing cgroup controller trees allow omission of the path 2013-09-26 20:20:30 +02:00
cgroups-agent cgroup-agent: port to sd-bus 2013-10-18 00:55:24 +02:00
cgtop Never call qsort on potentially NULL arrays 2013-10-13 17:56:54 -04:00
core systemd: use unit name in PrivateTmp directories 2013-10-22 22:54:09 -04:00
cryptsetup Introduce udev object cleanup functions 2013-10-13 17:56:55 -04:00
delta systemd-delta: Only print colors when on a tty 2013-08-04 08:33:02 -04:00
detect-virt build-sys: drop all distribution specfic checks 2013-01-04 23:26:21 +01:00
efi-boot-generator efi-boot-generator: hookup to fsck 2013-10-19 12:23:17 +02:00
fsck fsck: port to sd-bus 2013-10-18 00:55:24 +02:00
fstab-generator fsck-root: only run when requested in fstab 2013-10-19 12:23:17 +02:00
getty-generator getty-generator: Enable getty on all active serial consoles. 2013-09-12 08:34:30 -04:00
gpt-auto-generator gpt-auto-generator: Generate explicit dependencies on systemd-fsck@.service instead of using FsckPassNo 2013-10-19 12:23:17 +02:00
gudev licence: remove references to old FSF address 2012-12-17 11:41:31 +01:00
hostname bus: avoid 'bool' storage when retrieving 'b' from the message 2013-10-22 03:35:45 +02:00
initctl initctl: port to sd-bus 2013-10-18 01:34:55 +02:00
journal timedated: use libsystemd-bus instead of libdbus for bus communication 2013-10-16 06:15:02 +02:00
kernel-install kernel-install: add compat with 'installkernel' 2013-10-01 17:40:30 +02:00
libsystemd-bus bus: disable debug output in test-bus-kernel-benchmark 2013-10-25 07:28:19 +02:00
libsystemd-daemon Include <fcntl.h> instead of <sys/fcntl.h> 2013-04-13 21:02:03 -04:00
libsystemd-id128 id128: when taking user input for a 128bit ID, validate syntax 2013-04-30 08:36:01 -03:00
libudev macro: clean up usage of gcc attributes 2013-10-16 06:14:59 +02:00
locale localed: port from libdbus to libsystemd-bus 2013-10-22 13:25:17 +02:00
login inhibit: port to sd-bus 2013-10-22 13:00:54 +01:00
machine list: make our list macros a bit easier to use by not requring type spec on each invocation 2013-10-14 06:11:19 +02:00
machine-id-setup build-sys: drop all distribution specfic checks 2013-01-04 23:26:21 +01:00
modules-load modules-load: fix error handling 2013-10-02 19:45:12 +02:00
notify core: add new "scope" unit type for making a unit of pre-existing processes 2013-07-01 00:18:00 +02:00
nspawn timedated: use libsystemd-bus instead of libdbus for bus communication 2013-10-16 06:15:02 +02:00
nss-myhostname Never call qsort on potentially NULL arrays 2013-10-13 17:56:54 -04:00
python-systemd systemd-python: check for oom, give nicer error messages 2013-08-15 12:59:36 -04:00
quotacheck quota: use QUOTACHECK path correctly as tested in configure.ac 2013-05-06 21:15:38 +02:00
random-seed random-seed: we should return errno of failed loop_write 2013-09-13 14:32:14 +02:00
rc-local-generator Standarize on one spelling of symlink error message 2013-04-24 00:25:04 -04:00
readahead Introduce udev object cleanup functions 2013-10-13 17:56:55 -04:00
remount-fs Introduce _cleanup_endmntent_ 2013-10-03 22:13:55 -04:00
reply-password Use initalization instead of explicit zeroing 2013-04-05 19:50:57 -04:00
rfkill trivial: rfkill - don't include util.h twice 2013-10-19 19:28:21 +02:00
run timedated: use libsystemd-bus instead of libdbus for bus communication 2013-10-16 06:15:02 +02:00
shared STRV_FOREACH_BACKWARDS: improve readability a bit 2013-10-26 16:43:28 +02:00
shutdownd Add __attribute__((const, pure, format)) in various places 2013-05-02 22:52:09 -04:00
sleep systemd-sleep: add support for freeze and standby 2013-05-06 22:51:57 +02:00
socket-proxy socket-proxyd: Fix-up from previous change to avoid looping on errors. 2013-10-21 18:41:35 -07:00
stdio-bridge timedated: use libsystemd-bus instead of libdbus for bus communication 2013-10-16 06:15:02 +02:00
sysctl sysctl: allow overwriting of values specified in "later" files 2013-08-15 18:43:31 +02:00
system-update-generator Standarize on one spelling of symlink error message 2013-04-24 00:25:04 -04:00
systemctl list: make our list macros a bit easier to use by not requring type spec on each invocation 2013-10-14 06:11:19 +02:00
systemd api: unify some common bits used by public systemd APIs 2013-10-16 17:01:26 +02:00
test systemd: use unit name in PrivateTmp directories 2013-10-22 22:54:09 -04:00
timedate bus: avoid 'bool' storage when retrieving 'b' from the message 2013-10-22 03:35:45 +02:00
tmpfiles build-sys: use -Og instead of -O0 to catch warnings 2013-10-21 15:46:00 +02:00
tty-ask-password-agent conf-parser: restrict .include usage 2013-04-25 00:05:14 -03:00
udev udev: add network link configuration tool 2013-10-26 22:09:20 +02:00
update-utmp update-utmp: port to sd-bus 2013-10-18 06:21:26 +02:00
vconsole move _cleanup_ attribute in front of the type 2013-04-18 09:11:22 +02:00
.gitignore Add test coverage and generate report with lcov 2013-07-13 21:56:33 -04:00
Makefile relicense to LGPLv2.1 (with exceptions) 2012-04-12 00:24:39 +02:00