diff --git a/common/startup.c b/common/startup.c index 92bf94f..88eeee5 100644 --- a/common/startup.c +++ b/common/startup.c @@ -221,13 +221,6 @@ if (autoboot_state != AUTOBOOT_UNKNOWN) return autoboot_state; - globalvar_add_simple_enum("autoboot_abort_key", - &global_autoboot_abort_key, - global_autoboot_abort_keys, - ARRAY_SIZE(global_autoboot_abort_keys)); - globalvar_add_simple_int("autoboot_timeout", - &global_autoboot_timeout, "%u"); - menu_exists = stat(MENUFILE, &s) == 0; if (menu_exists) { @@ -272,6 +265,17 @@ enum autoboot_state autoboot; struct stat s; + /* + * Register autoboot variables here as they might be altered by + * init scripts. + */ + globalvar_add_simple_enum("autoboot_abort_key", + &global_autoboot_abort_key, + global_autoboot_abort_keys, + ARRAY_SIZE(global_autoboot_abort_keys)); + globalvar_add_simple_int("autoboot_timeout", + &global_autoboot_timeout, "%u"); + setenv("PATH", "/env/bin"); /* Run legacy /env/bin/init if it exists */