From 028a981c005e90c36c269e28709bf25032c2e8ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Thu, 14 Jul 2022 14:36:52 +0200 Subject: fstab-generator: add mode to check /sysroot/etc/fstab and maybe do daemon-reload The idea is that we can peek into /sysroot/etc/fstab and figure out if there's anything interesting there. We could use a separate binary for this, but we'd need to duplicate most of the logic that in systemd-fstab-generator. Thus I think it's nicer to make systemd-fstab-generator work as a multi-call binary. If called as systemd-sysroot-fstab-check, we look for units that we'd mount and call daemon-reload and initrd-fs.target/restart, similarly to what we did before, but in the process itself. --- meson.build | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'meson.build') diff --git a/meson.build b/meson.build index 5d7c8699fe..e6e3205090 100644 --- a/meson.build +++ b/meson.build @@ -2298,6 +2298,10 @@ exe = executable( install : true, install_dir : systemgeneratordir) +meson.add_install_script(meson_make_symlink, + systemgeneratordir / 'systemd-fstab-generator', + rootlibexecdir / 'systemd-sysroot-fstab-check') + if want_tests != 'false' test('test-fstab-generator', test_fstab_generator_sh, -- cgit v1.2.1