+ LIST_HEAD(device_list);
+ struct sigaction act;
+
+ logging_init("udevstart");
+ udev_config_init();
+ dbg("version %s", UDEV_VERSION);
+
+ udev_run_str = getenv("UDEV_RUN");
+ udev_log_str = getenv("UDEV_LOG");
+
+ /* disable all logging if not explicitely requested */
+ if (udev_log_str == NULL)
+ udev_log_priority = 0;
+
+ /* set signal handlers */
+ memset(&act, 0x00, sizeof(act));
+ act.sa_handler = (void (*) (int))sig_handler;
+ sigemptyset (&act.sa_mask);
+ act.sa_flags = 0;
+ sigaction(SIGALRM, &act, NULL);
+ sigaction(SIGINT, &act, NULL);
+ sigaction(SIGTERM, &act, NULL);
+
+ /* trigger timeout to prevent hanging processes */
+ alarm(UDEV_ALARM_TIMEOUT);
+
+ sysfs_init();
+ udev_rules_init(&rules, 1);
+
+ udev_scan_class(&device_list);
+ udev_scan_block(&device_list);
+ exec_list(&device_list);
+
+ udev_rules_cleanup(&rules);
+ sysfs_cleanup();
+ logging_close();