summaryrefslogtreecommitdiffstats
path: root/modules.d/slx-clock/module-setup.sh
blob: 67bce28a23fbe506ebf58cd93031d836b0bf1cc5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/usr/bin/env bash
check() {
	# Tell dracut that this module should only be included if it is required
	# explicitly.
	return 255
}
depends() {
	echo dnbd3-rootfs busybox
}
install() {
	inst_multiple "/etc/services" "/usr/share/zoneinfo/Europe/Berlin"
	inst "/usr/share/zoneinfo/Europe/Berlin" "/etc/localtime"

	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-timesyncd" "Configure timesyncd in stage 4" \
		--wafter   "s3-ntp-sync.service" \
		--wafter   "initrd-root-fs.target"
}