static int run(const char *dest, const char *dest_early, const char *dest_late) {
- if (in_initrd() > 0) {
+ if (in_initrd()) {
log_debug("Skipping generator, running in the initrd.");
- return 0;
+ return EXIT_SUCCESS;
}
if (detect_container() > 0) {
#include "fd-util.h"
#include "fileio.h"
#include "generator.h"
+#include "initrd-util.h"
#include "log.h"
#include "mkdir-label.h"
#include "parse-util.h"
assert_se(arg_dest = dest);
+ if (in_initrd()) {
+ log_debug("Skipping generator, running in the initrd.");
+ return EXIT_SUCCESS;
+ }
+
r = proc_cmdline_parse(parse_proc_cmdline_item, NULL, 0);
if (r < 0)
log_warning_errno(r, "Failed to parse kernel command line, ignoring: %m");
#include <unistd.h>
#include "generator.h"
+#include "initrd-util.h"
#include "log.h"
#include "mkdir-label.h"
#include "string-util.h"
assert_se(arg_dest = dest);
+ if (in_initrd()) {
+ log_debug("Skipping generator, running in the initrd.");
+ return EXIT_SUCCESS;
+ }
+
if (check_executable(RC_LOCAL_PATH) >= 0) {
log_debug("Automatically adding rc-local.service.");
#include "fs-util.h"
#include "generator.h"
+#include "initrd-util.h"
#include "log.h"
#include "path-util.h"
#include "proc-cmdline.h"
assert_se(arg_dest = dest_early);
+ if (in_initrd()) {
+ log_debug("Skipping generator, running in the initrd.");
+ return EXIT_SUCCESS;
+ }
+
r = generate_symlink();
if (r <= 0)
return r;
#include "generator.h"
#include "hashmap.h"
#include "hexdecoct.h"
+#include "initrd-util.h"
#include "install.h"
#include "log.h"
#include "main-func.h"
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);