Skip to content

Commit 58557fb

Browse files
committed
Fix minor oversights
1 parent 6ba68c0 commit 58557fb

File tree

4 files changed

+8
-5
lines changed

4 files changed

+8
-5
lines changed

conf/hooks/10-devices.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ tmpfs /dev tmpfs x-create=dir,rw,nosuid,noexec,mo
1616
/dev/full /dev/full none x-create=file,bind,rw,nosuid,noexec
1717
/dev/urandom /dev/urandom none x-create=file,bind,rw,nosuid,noexec
1818
/dev/random /dev/random none x-create=file,bind,rw,nosuid,noexec
19-
/dev/pts /dev/pts none x-create=dir,rbind,rw,nosuid,noexec
19+
/dev/pts /dev/pts none x-create=dir,bind,rw,nosuid,noexec
2020
/dev/ptmx /dev/ptmx none x-create=file,bind,rw,nosuid,noexec
2121
/dev/console /dev/console none x-create=file,bind,rw,nosuid,noexec
2222
/dev/shm /dev/shm none x-create=dir,bind,rw,nosuid,noexec,nodev

conf/hooks/99-nvidia.sh

+4-1
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,13 @@
33
# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
44

55
set -eu
6+
shopt -s lastpipe
67

78
source "${ENROOT_LIBEXEC_PATH}/common.sh"
89

9-
readonly $(grep "^NVIDIA_" "${ENROOT_ENVIRON}")
10+
grep "^NVIDIA_" "${ENROOT_ENVIRON}" | while read -r var; do
11+
export "${var}"
12+
done
1013

1114
cli_args=("--no-cgroups" "--ldconfig=@$(command -v ldconfig.real || command -v ldconfig)")
1215

src/common.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ common::realpath() {
9595
if ! rpath=$(readlink -f "${path}" 2> /dev/null); then
9696
common::err "No such file or directory: ${path}"
9797
fi
98-
echo "${rpath}"
98+
printf "%s" "${rpath}"
9999
}
100100

101101
common::envsubst() {

src/runtime.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ runtime::_do_mounts() {
1717
local -r rootfs="$1"
1818
local -a mounts=()
1919

20-
readarray -t mounts <<< "$2"; shift
20+
readarray -t mounts <<< "$2"
2121

2222
# Generate the mount configuration file from the rootfs fstab.
2323
common::envsubst "${rootfs}/etc/fstab" >> "${mount_file}"
@@ -47,7 +47,7 @@ runtime::_do_environ() {
4747
local -r rootfs="$1"
4848
local -a environ=()
4949

50-
readarray -t environ <<< "$2"; shift
50+
readarray -t environ <<< "$2"
5151

5252
# Generate the environment configuration file from the rootfs.
5353
common::envsubst "${rootfs}/etc/environment" >> "${environ_file}"

0 commit comments

Comments
 (0)