99-systemd.rules.in revision 3731acf1acfb4a6eb68374a5b137f3b368f63381
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering# This file is part of systemd.
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering# systemd is free software; you can redistribute it and/or modify it
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering# under the terms of the GNU Lesser General Public License as published by
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering# the Free Software Foundation; either version 2.1 of the License, or
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering# (at your option) any later version.
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart PoetteringACTION=="remove", GOTO="systemd_end"
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart PoetteringSUBSYSTEM=="tty", KERNEL=="tty[a-zA-Z]*|hvc*|xvc*|hvsi*", TAG+="systemd"
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart PoetteringKERNEL=="vport*", TAG+="systemd"
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart PoetteringSUBSYSTEM=="block", KERNEL!="ram*|loop*", TAG+="systemd"
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart PoetteringSUBSYSTEM=="block", KERNEL!="ram*|loop*", ENV{DM_UDEV_DISABLE_OTHER_RULES_FLAG}=="1", ENV{SYSTEMD_READY}="0"
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering# Ignore encrypted devices with no identified superblock on it, since
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering# we are probably still calling mke2fs or mkswap on it.
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart PoetteringSUBSYSTEM=="block", KERNEL!="ram*|loop*", ENV{DM_UUID}=="CRYPT-*", ENV{ID_PART_TABLE_TYPE}=="", ENV{ID_FS_USAGE}=="", ENV{SYSTEMD_READY}="0"
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering# Ignore raid devices that are not yet assembled and started
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart PoetteringSUBSYSTEM=="block", ENV{DEVTYPE}=="disk", KERNEL=="md*", TEST!="md/array_state", ENV{SYSTEMD_READY}="0"
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart PoetteringSUBSYSTEM=="block", ENV{DEVTYPE}=="disk", KERNEL=="md*", ATTR{md/array_state}=="|clear|inactive", ENV{SYSTEMD_READY}="0"
a0166609f782da91710dea9183d1bf138538db37Tom Gundersen# Ignore nbd devices in the "add" event, with "change" the nbd is ready
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart PoetteringACTION=="add", SUBSYSTEM=="block", KERNEL=="nbd*", ENV{SYSTEMD_READY}="0"
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering# We need a hardware independent way to identify network devices. We
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering# use the /sys/subsystem path for this. Current vanilla kernels don't
7e8e0422aeb16f2a09a40546c61df753d10029b6Lennart Poettering# actually support that hierarchy right now, however upcoming kernels
7e8e0422aeb16f2a09a40546c61df753d10029b6Lennart Poettering# will. HAL and udev internally support /sys/subsystem already, hence
7e8e0422aeb16f2a09a40546c61df753d10029b6Lennart Poettering# it should be safe to use this here, too. This is mostly just an
7e8e0422aeb16f2a09a40546c61df753d10029b6Lennart Poettering# identification string for systemd, so whether the path actually is
7e8e0422aeb16f2a09a40546c61df753d10029b6Lennart Poettering# accessible or not does not matter as long as it is unique and in the
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering# filesystem namespace.
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering# http://cgit.freedesktop.org/systemd/systemd/tree/src/libudev/libudev-enumerate.c#n922
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart PoetteringSUBSYSTEM=="net", KERNEL!="lo", TAG+="systemd", ENV{SYSTEMD_ALIAS}+="/sys/subsystem/net/devices/$name"
1716f6dcf54d4c181c2e2558e3d5414f54c8d9caLennart PoetteringSUBSYSTEM=="bluetooth", TAG+="systemd", ENV{SYSTEMD_ALIAS}+="/sys/subsystem/bluetooth/devices/%k"
1716f6dcf54d4c181c2e2558e3d5414f54c8d9caLennart PoetteringSUBSYSTEM=="bluetooth", TAG+="systemd", ENV{SYSTEMD_WANTS}+="bluetooth.target"
1716f6dcf54d4c181c2e2558e3d5414f54c8d9caLennart PoetteringENV{ID_SMARTCARD_READER}=="*?", TAG+="systemd", ENV{SYSTEMD_WANTS}+="smartcard.target"
1716f6dcf54d4c181c2e2558e3d5414f54c8d9caLennart PoetteringSUBSYSTEM=="sound", KERNEL=="card*", TAG+="systemd", ENV{SYSTEMD_WANTS}+="sound.target"
1716f6dcf54d4c181c2e2558e3d5414f54c8d9caLennart PoetteringSUBSYSTEM=="printer", TAG+="systemd", ENV{SYSTEMD_WANTS}+="printer.target"
1716f6dcf54d4c181c2e2558e3d5414f54c8d9caLennart PoetteringSUBSYSTEM=="usb", KERNEL=="lp*", TAG+="systemd", ENV{SYSTEMD_WANTS}+="printer.target"
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart PoetteringSUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ENV{ID_USB_INTERFACES}=="*:0701??:*", TAG+="systemd", ENV{SYSTEMD_WANTS}+="printer.target"
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering# Apply sysctl variables to network devices (and only to those) as they appear.
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart PoetteringACTION=="add", SUBSYSTEM=="net", KERNEL!="lo", RUN+="@rootlibexecdir@/systemd-sysctl --prefix=/proc/sys/net/ipv4/conf/$name --prefix=/proc/sys/net/ipv4/neigh/$name --prefix=/proc/sys/net/ipv6/conf/$name --prefix=/proc/sys/net/ipv6/neigh/$name"
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering# Pull in backlight save/restore for all firmware backlight devices
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart PoetteringACTION=="add", SUBSYSTEM=="backlight", ATTR{type}=="firmware", TAG+="systemd", ENV{SYSTEMD_WANTS}+="systemd-backlight@sys%p.service"
a0166609f782da91710dea9183d1bf138538db37Tom Gundersen# Asynchronously mount file systems implemented by these modules as
c73ce96b569e2f10dff64b7dc0bd271972674c2aLennart Poettering# soon as they are loaded.
c73ce96b569e2f10dff64b7dc0bd271972674c2aLennart PoetteringSUBSYSTEM=="module", KERNEL=="fuse", ACTION=="add", TAG+="systemd", ENV{SYSTEMD_WANTS}+="sys-fs-fuse-connections.mount"
e1c959948c0e31d6997bcdfbabfbd077784b2baeLennart PoetteringSUBSYSTEM=="module", KERNEL=="configfs", ACTION=="add", TAG+="systemd", ENV{SYSTEMD_WANTS}+="sys-kernel-config.mount"
e1c959948c0e31d6997bcdfbabfbd077784b2baeLennart PoetteringLABEL="systemd_end"