summaryrefslogtreecommitdiffstats
path: root/abs/core/nvidia-340xx-utils/nvidia-340xx-utils.install
diff options
context:
space:
mode:
Diffstat (limited to 'abs/core/nvidia-340xx-utils/nvidia-340xx-utils.install')
-rw-r--r--abs/core/nvidia-340xx-utils/nvidia-340xx-utils.install18
1 files changed, 7 insertions, 11 deletions
diff --git a/abs/core/nvidia-340xx-utils/nvidia-340xx-utils.install b/abs/core/nvidia-340xx-utils/nvidia-340xx-utils.install
index df17a32..1955c64 100644
--- a/abs/core/nvidia-340xx-utils/nvidia-340xx-utils.install
+++ b/abs/core/nvidia-340xx-utils/nvidia-340xx-utils.install
@@ -1,14 +1,10 @@
-post_install() {
- if ! getent group nvidia-persistenced >/dev/null; then
- groupadd -g 143 nvidia-persistenced
- fi
- if ! getent passwd nvidia-persistenced >/dev/null; then
- useradd -c 'NVIDIA Persistence Daemon' -u 143 -g nvidia-persistenced -d '/' -s /sbin/nologin nvidia-persistenced
- fi
+post_upgrade() {
+ echo "If you run into trouble with CUDA not being available, run nvidia-modprobe first."
}
-post_remove() {
- if getent group nvidia-persistenced >/dev/null; then
- userdel -f nvidia-persistenced
- fi
+post_install() {
+ getent group nvidia-persistenced &>/dev/null || groupadd -g 143 nvidia-persistenced
+ getent passwd nvidia-persistenced &>/dev/null || useradd -c 'NVIDIA Persistence Daemon' -u 143 -g nvidia-persistenced -d '/' -s /sbin/nologin nvidia-persistenced
+
+ post_upgrade
}