-#define set_var(_name, _var) \
- if (strcasecmp(variable, _name) == 0) { \
- dbg_parse("%s = '%s'", _name, value); \
- strncpy(_var, value, sizeof(_var)); \
- }
+static void init_variables(void)
+{
+ const char *env;
+
+ /* If any config values are specified, they will override these values. */
+ strcpy(udev_root, UDEV_ROOT);
+ strcpy(udev_db_path, UDEV_DB);
+ strcpy(udev_config_filename, UDEV_CONFIG_FILE);
+ strcpy(udev_rules_filename, UDEV_RULES_FILE);
+
+ udev_log = string_is_true(UDEV_LOG_DEFAULT);
+
+ udev_dev_d = 1;
+ 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;
+}