From: Martin Roukala (né Peres) Date: Sun, 16 Jan 2022 11:25:35 +0000 (+0200) Subject: meson: do not generate fstrim.service if we do not have systemd X-Git-Tag: v2.38-rc1~55^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=10490b33f7411c9fd358872c1969062b2a70f114;p=thirdparty%2Futil-linux.git meson: do not generate fstrim.service if we do not have systemd When systemd is disabled, the variable `systemdsystemunitdir` is missing, and thus we cannot install fstrim.service to it. This commit simply disables installing this service if systemd is not found or disabled. Signed-off-by: Martin Roukala (né Peres) --- diff --git a/sys-utils/meson.build b/sys-utils/meson.build index 70795eccc3..4b6cb7a1c8 100644 --- a/sys-utils/meson.build +++ b/sys-utils/meson.build @@ -220,12 +220,14 @@ if LINUX ] endif -fstrim_service = configure_file( - input : 'fstrim.service.in', - output : 'fstrim.service', - configuration : conf) - -install_data(fstrim_service, - install_dir : systemdsystemunitdir) -install_data('fstrim.timer', - install_dir : systemdsystemunitdir) +if systemd.found() + fstrim_service = configure_file( + input : 'fstrim.service.in', + output : 'fstrim.service', + configuration : conf) + + install_data(fstrim_service, + install_dir : systemdsystemunitdir) + install_data('fstrim.timer', + install_dir : systemdsystemunitdir) +endif