summaryrefslogtreecommitdiffstats
path: root/modules.d/slx-drm/module-setup.sh
diff options
context:
space:
mode:
Diffstat (limited to 'modules.d/slx-drm/module-setup.sh')
-rwxr-xr-xmodules.d/slx-drm/module-setup.sh12
1 files changed, 10 insertions, 2 deletions
diff --git a/modules.d/slx-drm/module-setup.sh b/modules.d/slx-drm/module-setup.sh
index 4baa5b2a..00ff80a7 100755
--- a/modules.d/slx-drm/module-setup.sh
+++ b/modules.d/slx-drm/module-setup.sh
@@ -17,6 +17,14 @@ install() {
mkdir -p "${initdir}/${dir%/*}"
cp -ar "$dir" "${initdir}/${dir%/*}"
done
- inst_hook pre-udev 10 "${moddir}/hooks/activate-nvidia-drivers.sh"
- inst_hook pre-pivot 50 "${moddir}/hooks/copy-nvidia-drivers.sh"
+ for _name in "s3-activate-nvidia-drivers" "s3-copy-nvidia-drivers"; 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
}