summaryrefslogtreecommitdiffstats
path: root/modules.d/slx-runmode/module-setup.sh
blob: c6ab95240549c62ba1b7a0bc8554506d87dc202e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/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
}
install() {
	_name="s3-enable-runmode"
	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"
}