summaryrefslogtreecommitdiffstats
path: root/modules.d/slx-addons/module-setup.sh
blob: 5d84584cb6687d9b9856c7307ea839d7ef729e12 (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
}
install() {
	inst "${moddir}/services/ldconfig-stage4.service" \
		"/opt/openslx/services/ldconfig-stage4.service"
	# Install service that enables addons
	_name="s3-setup-addons"
	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"
}