1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2024-10-30 06:25:25 +03:00
Commit Graph

149 Commits

Author SHA1 Message Date
Kay Sievers
e3396a2d38 cleanup commandline argument handling
Print and log failure, but don't fail for tools which are
usually not used iteractively. Add '--help' to all tools.
2006-08-21 02:38:20 +02:00
Kay Sievers
220dac4c5e export DRIVER for older kernels as a replacement for PHYSDEVDRIVER 2006-08-20 18:19:08 +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
469aa1df95 udevd: remove huge socket buffer on the control socket 2006-08-15 00:00:16 +02:00
Kay Sievers
254efc14a4 udevd: read DRIVER from the environment 2006-08-13 05:32:09 +02:00
Kay Sievers
f051e34069 udevd: autotune max_childs/max_childs_running 2006-08-10 12:50:53 +02:00
Kay Sievers
9824e9a764 udevd: remove useless udevinitsend parameter 2006-08-05 19:18:41 +02:00
Kay Sievers
239cc98b80 initialize unused sockets to -1 2006-08-05 13:24:05 +02:00
Kay Sievers
b3518c16e3 rename udevcontrol message types and variables 2006-08-05 13:22:44 +02:00
Kay Sievers
b437ec958a remove 'static' from local variable 2006-07-25 14:45:09 +02:00
Kay Sievers
e8c335b60a increase /proc/stat read buffer 2006-07-21 21:42:05 +02:00
Kay Sievers
733f070ddd switch uevent netlink socket to group 1 only 2006-07-21 21:41:11 +02:00
Kay Sievers
5005ca5991 remove udevsend 2006-05-27 12:20:51 +02:00
Kay Sievers
0e385feecc udevd: create leading directories for /dev/.udev/uevent_seqnum 2006-04-28 00:34:05 +02:00
Kay Sievers
90cd961e2c udevd: export initial sequence number on startup 2006-04-25 18:50:56 +02:00
Kay Sievers
03149e13c2 let udevmonitor show the possibly renamed devpath
For renamed network interfaces, the udev socket message header
contained the original devpath, which we have updated in the
environment after the kernel has silently renamed the netif.
2006-04-06 20:56:15 +02:00
Marco d'Itri
750d10daac add inotify support for hppa and MIPS and log if inotify is not available 2006-04-06 19:52:41 +02:00
Kay Sievers
7baada47be udevd: export current seqnum and add udevsettle 2006-04-05 00:08:10 +02:00
Kay Sievers
f660222775 correct use of fcntl() 2006-03-16 10:47:31 +01:00
Kay Sievers
3e5e833253 reset signal handler in event process 2006-03-16 10:46:30 +01:00
Kay Sievers
1a4e5303e0 udevd: fix queue export for multiple events for the same device
Identified by Joachim Plack <jplack@suse.de> while working around
the problem that the device nodes appear and disappear while the
partitiontable is re-read and the application need to waait for an
empty udevd queue.
2006-02-23 20:10:49 +01:00
Kay Sievers
4179809b22 remove UDEVD_UEVENT_INITSEND
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2006-01-28 05:04:38 +01:00
Kay Sievers
37854ffc9a let "ignore_device" always return the event successfully
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2006-01-25 02:21:07 +01:00
Kay Sievers
a9bd2ed84a rename apply_format() cause it is public now
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2006-01-25 01:28:31 +01:00
Andrey Borzenkov
f5f0c34f6d substitute format chars in RUN after rule matching
Apply substitutions before running a program, not while the rule
is parsed. It allows to use environment variables set during rule
processing as command arguments.
2006-01-24 20:10:48 +01:00
Kay Sievers
7d1e179f86 increase kernel uevent buffer size
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2006-01-24 12:12:07 +01:00
Kay Sievers
0ec819d92b ignore all messages with missing devpath or action
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2006-01-20 02:54:31 +01:00
Kay Sievers
1aa1e24848 replace libsysfs
We never used any of the libsysfs convenience features. Here we replace
it completely with 300 lines of code, which are much simpler and a bit
faster cause udev(d) does not open any syfs file for a simple event which
does not need any parent device information.

Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2006-01-09 21:18:00 +01:00
Kay Sievers
a2f87fddbf update SUSE rules
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-12-04 01:48:53 +01:00
Kay Sievers
997b164d56 move SEQNUM event skipping to udevsend
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-11-25 19:03:16 +01:00
Scott James Remnant
1b75f1096e clean-up empty queue directories
This allows scripts to do:
  while test -d /dev/.udev/queue; do sleep 0.1; done

And don't create a failed symlink if there is another event
for the same devpath in the queue.
2005-11-22 15:49:49 +01:00
Kay Sievers
8813e55c74 udevd: add a missing return
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-11-17 18:53:53 +01:00
Kay Sievers
82de5983ab udevd: track killed event processes as failed
Thanks to Marco for catching this.

Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-11-17 16:34:37 +01:00
Kay Sievers
fc55cf68ca remove "udev_db" option from config file
All udev state is kept in /$udev_root/.udev/ now. No option to
configure that anymore, it will always be there.

Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-11-16 04:14:15 +01:00
Kay Sievers
7a77025092 udevd: export event queue and event state
All pending and running events can be found as symlinks to the actual
device in /dev/.udev/queue/ now. This way we can lookup if specific events
are still in the queue, before doing actions which require events to have
finished.

All failed event processes can be found in /dev/.udev/failed/. This makes
it possible to retry a failed event process at a later time in the boot
process.

Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-11-16 04:12:53 +01:00
Kay Sievers
f4fc013652 udevd: track exit status of event process
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-11-16 02:06:46 +01:00
Kay Sievers
e825b59b07 udevd: ignore all messages without DEVPATH
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-11-16 00:13:28 +01:00
Kay Sievers
62821d0de1 add linux/types.h back, old glibc-kernel-headers want it
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-11-12 05:09:34 +01:00
Marco d'Itri
df4e89bfa6 move some logging from dbg() to info() 2005-11-07 18:52:03 +01:00
Marco d'Itri
ff3e4bed21 add strerror() to error logs 2005-11-07 18:44:18 +01:00
Kay Sievers
fc465079ca never queue events with TIMEOUT set
With removing the event reorder queue, we can fix the TIMEOUT events
like firmware loading proper, and never delay any of these events.

Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-11-07 14:10:09 +01:00
Kay Sievers
0b3dfb3d72 udevd: depend on netlink and remove all sequence reorder logic
Netlink will never get out-of-order and we just depend on it from
now on. Udevsend messages will have no effect if they contain a
sequence number (SEQNUM).

Thanks to Bastian Blank <waldi@debian.org>, for the debugging session
which identified a bug where the timeouts are not working if
inotify was not available. All the timeout handling is removed
now and this issue should be solved.

Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-11-07 02:22:44 +01:00
Kay Sievers
74adec7d97 fix typo in umask()
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-11-05 22:02:21 +01:00
Kay Sievers
287814b23c remove precompiled rules option
It was a workaround for speed up udev "coldplug", where ~800 events
happened a second time during bootup. No need for it with the rules
aleady parsed in the daemon.

Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-11-05 20:00:31 +01:00
Kay Sievers
3904a75817 udevd: disable OOM
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-11-05 19:41:00 +01:00
Kay Sievers
833b3c680b udevd: don't daemonize before initialization
Move socket init and rule parsing before forking, so we can start
emitting event immediately after udevd has started.

Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
2005-11-04 05:25:15 +01:00
Kay Sievers
c895fd0027 move rules parsing into daemon
The rules files are parsed only once at daemon startup. Every udev
event process will be fork()'d from udevd without exec()'ing the udev
binary. The in-memory rules will be inherited from the daemon itself.

If inotify is available, udevd will reload all rules if any change in
/etc/udev/rules.d/ happens. Otherwise -HUP or "udevcontrol reload_rules"
can be used.

Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-10-27 21:04:38 +02:00
Kay Sievers
916c5e4725 fix the new warnings I asked for
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-10-27 20:32:07 +02:00
Kay Sievers
dfedc446db udevd: move logging from err to info for non-hotplug uevent
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-10-12 11:55:49 +02:00
Kay Sievers
a5c606f6c3 force event socket buffer size to 16MB
Netlink events get lost when the kernel creates thousends of events
faster than udevd reads it. The default is 128 KB, which can carry
app. 500 events. Set it to 16 MB now.

  I have 4000 fibrechannel LUNs connected to my system.  There are two
  paths to the devices and two ports on the host connected via a switch.
  This gives 16000 when probed.
  I have had problems getting all of the entries in /dev created.
  -- Mark Haverkamp <markh@osdl.org>

Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-10-11 21:06:50 +02:00