1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-07 18:27:04 +03:00
Commit Graph

34 Commits

Author SHA1 Message Date
Tom Gundersen
4c83d99456 udev: event - keep one rtnl per worker, rather than per event
Creating the rtnl context is cheap, but freeing it may not be, due to
synchronous close().

Also drop some excessive logging. We now log about the changing ifname
exactly once.
2014-09-09 15:30:10 +02:00
Kay Sievers
be2ea723b1 udev: remove userspace firmware loading support 2014-08-30 11:34:20 +02:00
Kay Sievers
dd5eddd28a udev: unify event timeout handling 2014-07-29 15:18:27 +02:00
Kay Sievers
1ea972174b udev: do not skip the execution of RUN when renaming a network device fails 2014-05-15 10:32:26 +02:00
Kay Sievers
b26618399e udev: declare some symbols static 2013-11-13 03:34:24 +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
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
Lennart Poettering
44b601bc79 macro: clean up usage of gcc attributes
Always use our own macros, and name all our own macros the same style.
2013-10-16 06:14:59 +02:00
Kay Sievers
c26547d612 udev: support custom Linux Security Module labels for device nodes 2013-10-08 02:23:24 +02:00
Tom Gundersen
84b6ad702e udev: export tags of "dead" device nodes to /run/udev/static_node-tags/
Based on a patch by Kay Sievers.

A tag is exported at boot as a symlinks to the device node in the folder
/run/udev/static_node-tags/<tagname>/, if the device node exists.

These tags are cleaned up by udevadm info --cleanup-db, but are otherwise
never removed.
2013-07-16 20:07:57 +02:00
Kay Sievers
9d7d42bc40 udev: add builtin 'keyboard' to manage key mappings 2013-07-10 22:52:55 +02:00
Kay Sievers
a4bbef0992 hwdb: add --lookup-prefix= option 2013-07-08 11:44:17 +02:00
Kay Sievers
67410e9f73 hwdb: add --device=<device-id> and --filter=<key name glob> 2013-07-01 22:34:43 +02:00
Zbigniew Jędrzejewski-Szmek
e4d2bfdd73 Add printf attributes in exported headers
gcc (and other compilers) sometimes generate spurious warnings, and
thus users of public headers must be able to disable warnings.

Printf format attributes can be disabled by setting
    #define _sd_printf_attr_
before including the header file.

Also, add similar logic for sentinel attribute:
    #define _sd_sentinel_attr_
before including the header file disables the attribute.
2013-04-25 21:50:48 -04:00
Kay Sievers
d8d4bee76c build-sys: fix HAVE/ENABLE_FIRMWARE
https://bugs.freedesktop.org/show_bug.cgi?id=62864
2013-03-28 15:28:10 +01:00
Tom Gundersen
a3bd8447be udev: make firmware loading optional and disable by default
Distros that whish to support old kernels should set
  --with-firmware-dirs="/usr/lib/firmware/updates:/usr/lib/firmware"
to retain the old behaviour.
2013-03-18 15:19:51 +01:00
Kay Sievers
22582bb2cb udev: set default rules permissions only at "add" events 2013-01-27 21:46:36 +01:00
Kay Sievers
1edefa4f1d udev: in addition to DEVMODE, honor DEVUID, DEVGID from the uevent 2012-12-31 04:48:44 +01:00
Tom Gundersen
e30431623a build-sys: make loadable module support optional
kmod is unecessary if loadable module support is disabled in the kernel,
so make the dependency optional.
2012-11-20 19:35:27 +01:00
Anders Olofsson
f553b3b107 udev: make blkid optional
I'm building systemd for an embedded system and we would prefer not having
to include the entire util-linux package just to get a libblkid whose
functionality we don't need.
2012-11-16 01:17:18 +01:00
Kay Sievers
1298001ec5 use the same email address everywhere 2012-11-12 19:47:43 +01:00
Kay Sievers
40fe8b11be udev: use usec_t and now() 2012-11-12 01:03:14 +01:00
Kay Sievers
a660c63c55 udev: net_id - add builtin to retrieve data for network devices 2012-11-09 13:05:19 +01:00
Kay Sievers
59803c380d udev: hwdb - search parents for 'modalias' and data 2012-11-09 13:05:11 +01:00
Kay Sievers
4af113f997 udev: builtin - do not fail builtin initialization if one of them returns an error 2012-10-26 03:45:25 +02:00
Kay Sievers
796b06c21b udev: add hardware database support 2012-10-23 16:43:32 +02:00
Kay Sievers
0bb91b5010 udev: add btrfs support
All "btrfs" file systems will be registered with the kernel when they
show up.

Incomplete multi-device volumes will set SYSTEMD_READY=0, to prevent
access until the volume is complete and fully registered.
2012-09-17 13:54:03 +02:00
Kay Sievers
775f8b3c74 udev: use conf_files_list() to search rules files 2012-05-07 13:21:05 +02:00
Kay Sievers
e9a5ef7cdd selinux: unify systemd and udev code 2012-04-17 16:05:28 +02:00
Kay Sievers
33502ffe2e udev: use startswith() and streq() 2012-04-16 20:54:17 +02:00
Kay Sievers
6ada823a9a udev: remove configuration options for /dev, /sys, /run directories 2012-04-16 19:20:57 +02:00
Kay Sievers
83cd6b754b udev: convert 'uaccess' to a builtin 2012-04-09 19:25:41 +02:00
Kay Sievers
fc863deada udev: fix gcc warnings 2012-04-04 05:21:35 +02:00
Kay Sievers
3e2147858f move imported udev into place 2012-04-04 05:05:07 +02:00