generator: run various generators only run on the host, not in initrd
These 5 generators only make sense on the host,not in the initrd, hence if they end up in the initrd anyway, make them exit quickly.
This commit is contained in:
@@ -14,6 +14,7 @@
|
||||
#include "generator.h"
|
||||
#include "hashmap.h"
|
||||
#include "hexdecoct.h"
|
||||
#include "initrd-util.h"
|
||||
#include "install.h"
|
||||
#include "log.h"
|
||||
#include "main-func.h"
|
||||
@@ -899,6 +900,11 @@ static int run(const char *dest, const char *dest_early, const char *dest_late)
|
||||
SysvStub *service;
|
||||
int r;
|
||||
|
||||
if (in_initrd()) {
|
||||
log_debug("Skipping generator, running in the initrd.");
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
assert_se(arg_dest = dest_late);
|
||||
|
||||
r = lookup_paths_init_or_warn(&lp, RUNTIME_SCOPE_SYSTEM, LOOKUP_PATHS_EXCLUDE_GENERATED, NULL);
|
||||
|
||||
Reference in New Issue
Block a user