aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkay.sievers@vrfy.org <kay.sievers@vrfy.org>2004-11-25 10:15:32 +0100
committerGreg KH <gregkh@suse.de>2005-04-26 23:00:29 -0700
commit16ac31aaee34f1085daf1c43a8645b174712b2d4 (patch)
tree97a39c85f9bb5bd6ebbc13af487b2c65e7829b65
parent97adaace4f8f89ce175657d3ec71811715cc4dae (diff)
downloadudev-16ac31aaee34f1085daf1c43a8645b174712b2d4.tar.gz
[PATCH] don't call the hotplug scripts with a test run
-rw-r--r--test/udev-test.pl1
-rw-r--r--udev.c2
-rw-r--r--udev.h1
-rw-r--r--udev_config.c8
4 files changed, 10 insertions, 2 deletions
diff --git a/test/udev-test.pl b/test/udev-test.pl
index d5845795..593e34e8 100644
--- a/test/udev-test.pl
+++ b/test/udev-test.pl
@@ -1153,6 +1153,7 @@ $ENV{UDEV_TEST} = "yes";
$ENV{SYSFS_PATH} = $sysfs;
$ENV{UDEV_CONFIG_FILE} = $main_conf;
$ENV{UDEV_NO_DEVD} = "yes";
+$ENV{UDEV_NO_HOTPLUGD} = "yes";
sub udev {
diff --git a/udev.c b/udev.c
index 35fa533a..3a97eb10 100644
--- a/udev.c
+++ b/udev.c
@@ -223,7 +223,7 @@ int main(int argc, char *argv[], char *envp[])
}
hotplug:
- if (manage_hotplug_event())
+ if (udev_hotplug_d && manage_hotplug_event())
udev_multiplex_directory(&udev, HOTPLUGD_DIR, HOTPLUG_SUFFIX);
exit:
diff --git a/udev.h b/udev.h
index 1e3db5af..ace843f0 100644
--- a/udev.h
+++ b/udev.h
@@ -91,5 +91,6 @@ extern char default_owner_str[OWNER_SIZE];
extern char default_group_str[GROUP_SIZE];
extern int udev_log;
extern int udev_dev_d;
+extern int udev_hotplug_d;
#endif
diff --git a/udev_config.c b/udev_config.c
index 51bdc720..9549471b 100644
--- a/udev_config.c
+++ b/udev_config.c
@@ -51,6 +51,7 @@ char default_owner_str[OWNER_SIZE];
char default_group_str[GROUP_SIZE];
int udev_log;
int udev_dev_d;
+int udev_hotplug_d;
static int string_is_true(char *str)
@@ -68,7 +69,7 @@ static void init_variables(void)
{
char *env;
- /* fill up the defaults.
+ /* fill up the defaults.
* If any config values are specified, they will
* override these values. */
strfieldcpy(udev_root, UDEV_ROOT);
@@ -82,6 +83,11 @@ static void init_variables(void)
env = getenv("UDEV_NO_DEVD");
if (env && string_is_true(env))
udev_dev_d = 0;
+
+ udev_hotplug_d = 1;
+ env = getenv("UDEV_NO_HOTPLUGD");
+ if (env && string_is_true(env))
+ udev_hotplug_d = 0;
}
int parse_get_pair(char **orig_string, char **left, char **right)