diff options
author | Daniel Baumann <daniel.baumann@open-infrastructure.net> | 2020-03-01 14:34:21 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@open-infrastructure.net> | 2020-03-01 14:34:21 +0000 |
commit | 1b34b79bf1dde375792a2b7218513f065b7125e9 (patch) | |
tree | b355da7742b56f8dbbb8e2161299477d647026e0 /share | |
parent | Correcting permissions of pre-start.unlink-console.sh hook. (diff) | |
download | compute-tools-1b34b79bf1dde375792a2b7218513f065b7125e9.tar.xz compute-tools-1b34b79bf1dde375792a2b7218513f065b7125e9.zip |
Adding post-start hook to set nvidia device ownership.
Signed-off-by: Daniel Baumann <daniel.baumann@open-infrastructure.net>
Diffstat (limited to '')
-rwxr-xr-x | share/hooks/post-start.chown-nvidia.sh | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/share/hooks/post-start.chown-nvidia.sh b/share/hooks/post-start.chown-nvidia.sh new file mode 100755 index 0000000..457b6e5 --- /dev/null +++ b/share/hooks/post-start.chown-nvidia.sh @@ -0,0 +1,8 @@ +#!/bin/sh + +set -e + +if grep -qs nvidia /var/lib/machines/"${NAME}"/etc/group +then + chroot "/var/lib/machines/${NAME}" chown root:nvidia "/dev/nvidia*" +fi |