Skip to content

Commit

Permalink
feat(systemd-timedated): add systemd-timedated module to the spec file
Browse files Browse the repository at this point in the history
  • Loading branch information
johannbg authored and haraldh committed Apr 22, 2021
1 parent 1c41cc9 commit 0202125
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
1 change: 1 addition & 0 deletions dracut.spec
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 6 additions & 4 deletions modules.d/01systemd-timedated/module-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand All @@ -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
}

0 comments on commit 0202125

Please sign in to comment.