diff options
Diffstat (limited to 'modules.d/slx-clock')
-rwxr-xr-x | modules.d/slx-clock/module-setup.sh | 18 | ||||
-rw-r--r-- | modules.d/slx-clock/services/s3-configure-timesyncd.service | 12 | ||||
-rw-r--r-- | modules.d/slx-clock/services/s3-ntp-sync.service | 13 |
3 files changed, 8 insertions, 35 deletions
diff --git a/modules.d/slx-clock/module-setup.sh b/modules.d/slx-clock/module-setup.sh index 0977522e..f47086e6 100755 --- a/modules.d/slx-clock/module-setup.sh +++ b/modules.d/slx-clock/module-setup.sh @@ -10,14 +10,12 @@ depends() { install() { inst_multiple "/etc/services" "/usr/share/zoneinfo/Europe/Berlin" inst "/usr/share/zoneinfo/Europe/Berlin" "/etc/localtime" - for _name in "s3-ntp-sync" "s3-configure-timesyncd"; do - inst "$moddir/hooks/${_name}.sh" \ - "/usr/local/bin/${_name}.sh" - inst_simple "${moddir}/services/${_name}.service" \ - "${systemdsystemunitdir}/${_name}.service" - mkdir --parents \ - "${initdir}/${systemdsystemunitdir}/initrd.target.wants" - ln_r "${systemdsystemunitdir}/${_name}.service" \ - "${systemdsystemunitdir}/initrd.target.wants/${_name}.service" - done + + slx_service "s3-ntp-sync" "Sync time via NTP" \ + --wafter "s3-fetch-config.service" \ + --requires "s3-setup-bootif-network.service" \ + --after "s3-setup-bootif-network.service" + slx_service "s3-configure-timesync" "Configure timesyncd in stage 4" \ + --wafter "s3-ntp-sync.service" \ + --wafter "initrd-root-fs.target" } diff --git a/modules.d/slx-clock/services/s3-configure-timesyncd.service b/modules.d/slx-clock/services/s3-configure-timesyncd.service deleted file mode 100644 index c370859a..00000000 --- a/modules.d/slx-clock/services/s3-configure-timesyncd.service +++ /dev/null @@ -1,12 +0,0 @@ -[Unit] -Description=Configure timesyncd in stage 4 -After=initrd-root-fs.target -After=s3-ntp-sync.service -Before=initrd-switch-root.target -DefaultDependencies=no -IgnoreOnIsolate=true - -[Service] -Type=oneshot -RemainAfterExit=true -ExecStart=/usr/local/bin/s3-configure-timesyncd.sh diff --git a/modules.d/slx-clock/services/s3-ntp-sync.service b/modules.d/slx-clock/services/s3-ntp-sync.service deleted file mode 100644 index 6cb9eccd..00000000 --- a/modules.d/slx-clock/services/s3-ntp-sync.service +++ /dev/null @@ -1,13 +0,0 @@ -[Unit] -Description=Sync time via NTP -Requires=s3-setup-bootif-network.service -After=s3-setup-bootif-network.service -Requires=s3-fetch-config.service -After=s3-fetch-config.service -DefaultDependencies=no -IgnoreOnIsolate=true - -[Service] -Type=oneshot -RemainAfterExit=true -ExecStart=/usr/local/bin/s3-ntp-sync.sh |