summaryrefslogblamecommitdiffstats
path: root/modules.d/slx-clock/module-setup.sh
blob: f9ff0c48783e6b697ee10615982a488f4410933a (plain) (tree)
1
2
3
4
5
6
7
8
9
10






                                                                                
                                 

           





                                                                                   

                                                             

                                                                                    
                                                            
                                                                       
 
#!/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() {
	# see where systemd-cat is installed
	local sdc_bin="$( command -v systemd-cat )"
	if [ -z "$sdc_bin" ]; then
		warn "Could not find systemd-cat in $PATH. Check if its installed."
		return 1
	fi
	# wait til we have the openslx config for ntp servers
	# which happens in pre-mount/10
	inst_multiple "/etc/services" "/usr/share/zoneinfo/Europe/Berlin" "$sdc_bin"
	inst "/usr/share/zoneinfo/Europe/Berlin" "/etc/localtime"
	inst_hook pre-mount 15 "$moddir/scripts/ntp-sync.sh"
	inst_hook pre-pivot 15 "$moddir/scripts/configure-timesyncd.sh"
}