summaryrefslogtreecommitdiffstats
path: root/modules.d/slx-clock/module-setup.sh
blob: b99f764059a787d3e2a70b9779d18adf671eb75d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/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"
	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}/dracut-pre-pivot.service.requires"
		ln_r "${systemdsystemunitdir}/${_name}.service" \
				"${systemdsystemunitdir}/dracut-pre-pivot.service.requires/${_name}.service"
	done
}