blob: a859efabe3dbce288d8162e6ab93bf3b5acd3002 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
diff --git a/dkms b/dkms
index abb01a4..265b69a 100644
--- a/dkms
+++ b/dkms
@@ -162,11 +162,14 @@ set_kernel_source_dir()
# A little test function for DKMS commands that only work on one kernel.
have_one_kernel() {
- (( ${#kernelver[@]} > 1 )) && \
- die 4 $"The action $1 does not support multiple kernel version" \
- $"parameters on the command line."
- [[ $all ]] && die 5 $"The action $1 does not support the --all" \
- $"parameter."
+ if (( ${#kernelver[@]} != 1 )); then
+ die 4 $"The action $1 does not support multiple kernel version" \
+ $"parameters on the command line."
+ fi
+ if [[ $all ]]; then
+ die 5 $"The action $1 does not support the --all" \
+ $"parameter."
+ fi
}
|