New version is still broken. The way 20051026+1 is written, if
NVIDIA_CARDS is 0 then make_nodes is still run, possibly creating
/dev/nvidiactl needlessly. Also, expr in bash apparently lets you get
away with the form of variable expansion you used, but dash does not.
Look at the patch I gave you again, it was correct, and now here's
patch against version 20051026+1:
# test if anything is requested
-if [ -z "$NVIDIA_CARDS" ] || [ "$NVIDIA_CARDS" -lt 0 ]; then
+if [ -z "$NVIDIA_CARDS" ] || [ "$NVIDIA_CARDS" -lt 1 ]; then
# Nothing to do but exit.
exit 0
fi
@@ -16,7 +16,7 @@
mknod -m 0660 /dev/nvidiactl c 195 255
chgrp video /dev/nvidiactl
fi
- for i in $(seq 0 $((NVIDIA_CARDS - 1))); do
+ for i in $(seq 0 $(($NVIDIA_CARDS - 1))); do
if ! [ -e /dev/nvidia$i ]; then
mknod -m 0660 /dev/nvidia$i c 195 $i
chgrp video /dev/nvidia$i
Message-ID: <email address hidden> d/nvidia- kernel contains bashisms
Date: Fri, 28 Oct 2005 18:04:51 -0700
From: Jamie Heilman <email address hidden>
To: <email address hidden>
Cc: <email address hidden>
Subject: Re: /etc/init.
New version is still broken. The way 20051026+1 is written, if
NVIDIA_CARDS is 0 then make_nodes is still run, possibly creating
/dev/nvidiactl needlessly. Also, expr in bash apparently lets you get
away with the form of variable expansion you used, but dash does not.
Look at the patch I gave you again, it was correct, and now here's
patch against version 20051026+1:
@@ -6,7 +6,7 @@ nvidia- kernel ] && . /etc/default/ nvidia- kernel
[ -r /etc/default/
# test if anything is requested
-if [ -z "$NVIDIA_CARDS" ] || [ "$NVIDIA_CARDS" -lt 0 ]; then
+if [ -z "$NVIDIA_CARDS" ] || [ "$NVIDIA_CARDS" -lt 1 ]; then
# Nothing to do but exit.
exit 0
fi
@@ -16,7 +16,7 @@
mknod -m 0660 /dev/nvidiactl c 195 255
chgrp video /dev/nvidiactl
fi
- for i in $(seq 0 $((NVIDIA_CARDS - 1))); do
+ for i in $(seq 0 $(($NVIDIA_CARDS - 1))); do
if ! [ -e /dev/nvidia$i ]; then
mknod -m 0660 /dev/nvidia$i c 195 $i
chgrp video /dev/nvidia$i
-- audible. transient. net/~jamie/
-Frank Zappa
Jamie Heilman http://
"Most people wouldn't know music if it came up and bit them on the ass."