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