1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2024-11-01 09:21:11 +03:00
Commit Graph

26 Commits

Author SHA1 Message Date
Kay Sievers
0cd9f451ab do not touch node ownership and permissions, if already correct
In some cases "change" events reapplied node permissions which
changed applied ACL's. So, preserve permissions if already correct.
2008-07-10 23:54:28 +02:00
Kay Sievers
c70560feef logging: add trailing newline to all strings 2008-04-20 21:07:06 +02:00
Kay Sievers
35ea39e277 selinux: set context for real file name not the temp name 2008-03-13 15:54:21 +01:00
Anthony L. Awtrey
a0092d28db do not skip RUN execution if device node removal fails 2007-12-29 17:19:06 +01:00
Kay Sievers
b2d1ae727e prevent wrong symlink creation if database disagress with current rules 2007-09-20 19:38:58 +02:00
Kay Sievers
25c208d659 ignore device node names while restoring symlinks from the stack 2007-09-12 00:21:53 +02:00
Kay Sievers
89e0a02226 add /dev/rtc symlink if new rtc drivers are used 2007-08-30 15:03:21 +02:00
Kay Sievers
14c7994263 always unlink temporary file before creating new one 2007-06-25 16:03:11 +02:00
Kay Sievers
678484af64 do not try to create existing file 2007-06-21 09:00:35 +02:00
Kay Sievers
e54f0b4ad2 atomically replace existing nodes and symlinks
Based on a patch from Scott James Remnant <scott@ubuntu.com>.
2007-06-21 02:28:09 +02:00
Kay Sievers
953249a3a0 add TEST=="<file>" key 2007-06-03 00:01:46 +02:00
Kay Sievers
eff4a67369 udevtest: add --force mode 2007-03-21 11:55:26 +01:00
Kay Sievers
604f104af4 if a node goes away, possibly restore a waiting symlink 2007-03-19 11:57:54 +01:00
Kay Sievers
24f0605c1f priority based symlink handling
Symlinks can have priorities now, the priority is assigned to the device
and specified with OPTIONS="link_priority=100". Devices with higher
priorities overwrite the symlinks of devices with lower priorities.
If the device, that currently owns the link goes away, the symlink
will be removed, and recreated, pointing to the next device with the
highest actual priority.

This should solve the issue, that inserting an USB-stick may overwrite the
/dev/disk/by-id/-link of another disk, and removes the entire link after the
USB-stick is disconnected. If no priorities are specified, the new link will
overwrite the current one, and if the device goes away, it will restore
the old link. It should be possible to assign lower priorities to removable
devices, if needed.

In multipath setups, we see several devices, which all connect to the same
volume, and therefore all try to create the same metadata-links. The
different path-devices are combined into one device-mapper device, which also
contains the same metadata. It should be possible, to assign multipath-table
device-mapper devices a higher priority, so path-devices that appear and
disappear, will not overwrite or delete the device-mapper device links.
2007-03-18 12:51:57 +01:00
Kay Sievers
31de3a2ba1 read list of devices from index, make index private to database 2007-03-17 10:08:25 +01:00
Kay Sievers
d7fdcd6192 remove old error message 2007-03-16 21:15:54 +01:00
Kay Sievers
456cb38756 selinux: move selinux_exit() to the main programs 2007-03-16 21:13:07 +01:00
Kay Sievers
27d4bf1817 restore overwritten symlinks when the device goes away 2007-03-15 03:54:12 +01:00
Kay Sievers
27b77df44d update source file headers 2006-08-28 00:29:11 +02:00
Kay Sievers
95776dc6ec consistent key naming to match only the event device or include all parent devices
This scheme is more consistent and makes it obvious if a match happens
against the event device only, or the full chain of parent devices.

The old key names are now:
  BUS -> SUBSYSTEMS
  ID -> KERNELS
  SYSFS -> ATTRS
  DRIVER -> DRIVERS

Match keys for the event device:
  KERNEL
  SUBSYSTEM
  ATTR
  DRIVER (in a future release, for now the same as DRIVERS)

Match keys for all devices along the parent device chain:
  KERNELS
  SUBSYSTEMS
  ATTRS
  DRIVERS

ID, BUS, SYSFS are no longer mentioned in the man page but still work.
DRIVER must be converted to DRIVERS to match the new scheme. For now,
an error is logged, if DRIVER is used. In a future release, the DRIVER
key behaviour will change.
2006-08-19 16:06:25 +02:00
Harald Hoyer
eef7c9a385 selinux: init once in the daemon, not in every event process 2006-08-18 03:47:59 +02:00
Kay Sievers
fa33d857e2 don't remove symlinks if they are already there
Consecutive "add" events will not remove and recreate the same symlinks
anymore. No longer valid links, like after changing a filesystem label,
will still be removed.
2006-06-14 16:32:52 +02:00
Kay Sievers
c6d4aeb930 udevtest: don't try to delete symlinks 2006-04-15 19:49:15 +02:00
Kay Sievers
7ba2d2e6ae apply format char to variables exported by ENV 2006-04-15 19:32:05 +02:00
Kay Sievers
ff9a488d8c remove old symlinks before creating current ones
This will prevent incorrect symlinks when a filesystem
label is changed and the event is triggered again from
sysfs.
2006-04-12 22:08:05 +02:00
Kay Sievers
a4d5ca644e merge device event handling and make database content available on "remove" 2006-04-05 22:29:33 +02:00