/*
- * udevstart.c
+ * quick and dirty way to populate a /dev directory
*
+ * Copyright (C) 2004 Harald Hoyer <harald@redhat.com>
* Copyright (C) 2004 Greg Kroah-Hartman <greg@kroah.com>
- * Copyright (C) 2004 Kay Sievers <kay@vrfy.org>
- *
- * Quick and dirty way to populate a /dev with udev if your system
- * does not have access to a shell. Based originally on a patch
- * from:
- * Harald Hoyer <harald@redhat.com>
+ * Copyright (C) 2004-2006 Kay Sievers <kay@vrfy.org>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
- * 675 Mass Ave, Cambridge, MA 02139, USA.
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*/
#include "udev.h"
#include "udev_rules.h"
+#include "udev_selinux.h"
static const char *udev_run_str;
static const char *udev_log_str;
{
struct sysfs_device *dev;
struct udevice *udev;
- int retval;
+ int retval = 0;
/* clear and set environment for next event */
clearenv();
/* override built-in sysfs device */
udev->dev = dev;
strcpy(udev->action, "add");
- udev->devt = udev_device_get_devt(udev);
if (strcmp(udev->dev->subsystem, "net") != 0) {
udev->devt = udev_device_get_devt(udev);
goto exit;
}
if (udev->name[0] != '\0')
- retval = udev_add_device(udev);
- else {
+ retval = udev_device_event(&rules, udev);
+ else
info("device node creation supressed");
- goto exit;
- }
- if (retval == 0 && !udev->ignore_device && udev_run) {
+ if (retval == 0 && udev_run) {
struct name_entry *name_loop;
dbg("executing run list");
logging_init("udevstart");
udev_config_init();
+ selinux_init();
dbg("version %s", UDEV_VERSION);
udev_run_str = getenv("UDEV_RUN");