chiark / gitweb /
units: replace a few non-essential API mounts with automount units
[elogind.git] / src / 99-systemd.rules
1 #  This file is part of systemd.
2 #
3 #  Copyright 2010 Lennart Poettering
4 #
5 #  systemd is free software; you can redistribute it and/or modify it
6 #  under the terms of the GNU General Public License as published by
7 #  the Free Software Foundation; either version 2 of the License, or
8 #  (at your option) any later version.
9 #
10 #  systemd is distributed in the hope that it will be useful, but
11 #  WITHOUT ANY WARRANTY; without even the implied warranty of
12 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 #  General Public License for more details.
14 #
15 #  You should have received a copy of the GNU General Public License
16 #  along with systemd; If not, see <http://www.gnu.org/licenses/>.
17
18 ACTION!="add|change", GOTO="systemd_end"
19
20 KERNEL=="tty[0-9]|tty1[0-2]", ENV{SYSTEMD_EXPOSE}="1"
21 KERNEL=="ttyS*", ENV{SYSTEMD_EXPOSE}="1"
22
23 SUBSYSTEM=="block", ENV{SYSTEMD_EXPOSE}="1"
24
25 # We need a hardware independent way to identify network devices. We
26 # use the /sys/subsystem path for this. Current vanilla kernels don't
27 # actually support that hierarchy right now, however upcoming kernels
28 # will. HAL and udev internally support /sys/subsystem already, hence
29 # it should be safe to use this here, too. This is mostly just an
30 # identification string for systemd, so whether the path actually is
31 # accessible or not does not matter as long as it is unique and in the
32 # filesystem namespace.
33 #
34 # http://git.kernel.org/?p=linux/hotplug/udev.git;a=blob;f=libudev/libudev-enumerate.c;h=da831449dcaf5e936a14409e8e68ab12d30a98e2;hb=HEAD#l742
35
36 SUBSYSTEM=="net", KERNEL!="lo", ENV{SYSTEMD_EXPOSE}="1", ENV{SYSTEMD_ALIAS}="/sys/subsystem/net/devices/%k"
37
38 LABEL="systemd_end"