From 020212534b38b55c03379ba714056aedeaaef190 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B3hann=20B=2E=20Gu=C3=B0mundsson?= Date: Wed, 14 Apr 2021 18:17:03 +0000 Subject: [PATCH] feat(systemd-timedated): add systemd-timedated module to the spec file --- dracut.spec | 1 + modules.d/01systemd-timedated/module-setup.sh | 10 ++++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/dracut.spec b/dracut.spec index 07e767ce6d..4603eb853c 100644 --- a/dracut.spec +++ b/dracut.spec @@ -332,6 +332,7 @@ echo 'dracut_rescue_image="yes"' > $RPM_BUILD_ROOT%{dracutlibdir}/dracut.conf.d/ %{dracutlibdir}/modules.d/01systemd-resolved %{dracutlibdir}/modules.d/01systemd-sysctl %{dracutlibdir}/modules.d/01systemd-sysusers +%{dracutlibdir}/modules.d/01systemd-timedated %{dracutlibdir}/modules.d/01systemd-timesyncd %{dracutlibdir}/modules.d/03modsign %{dracutlibdir}/modules.d/03rescue diff --git a/modules.d/01systemd-timedated/module-setup.sh b/modules.d/01systemd-timedated/module-setup.sh index af331ef6c3..58a1ef04e6 100755 --- a/modules.d/01systemd-timedated/module-setup.sh +++ b/modules.d/01systemd-timedated/module-setup.sh @@ -6,8 +6,10 @@ check() { # If the binary(s) requirements are not fulfilled the module can't be installed - require_binaries timedatectl || return 1 - require_binaries "$systemdutildir"/systemd-timedated || return 1 + require_binaries \ + timedatectl \ + "$systemdutildir"/systemd-timedated \ + || return 1 # Return 255 to only include the module, if another module requires it. return 255 @@ -18,7 +20,7 @@ check() { depends() { # This module has external dependency on other module(s). - echo dbus systemd + echo dbus # Return 0 to include the dependent module(s) in the initramfs. return 0 @@ -38,6 +40,6 @@ install() { if [[ $hostonly ]]; then inst_multiple -H -o \ "$systemdsystemconfdir"/systemd-timedated.service \ - "$systemdsystemconfdir"/systemd-timedated.service/*.conf + "$systemdsystemconfdir/systemd-timedated.service/*.conf" fi }