summaryrefslogtreecommitdiffstats
path: root/core/modules/nvidia-libs@/templates/addon-required.template
diff options
context:
space:
mode:
Diffstat (limited to 'core/modules/nvidia-libs@/templates/addon-required.template')
-rw-r--r--core/modules/nvidia-libs@/templates/addon-required.template9
1 files changed, 9 insertions, 0 deletions
diff --git a/core/modules/nvidia-libs@/templates/addon-required.template b/core/modules/nvidia-libs@/templates/addon-required.template
new file mode 100644
index 00000000..68cb1284
--- /dev/null
+++ b/core/modules/nvidia-libs@/templates/addon-required.template
@@ -0,0 +1,9 @@
+#!/bin/ash
+
+if ! [ -e /sys/module/nvidia/version ]; then
+ echo "No driver loaded, not enabling"
+ exit 1
+fi
+[ "$( cat /sys/module/nvidia/version )" = "%TARGET_VERSION%" ] && exit 0
+echo "Driver version mismatch, not enabling"
+exit 1