Package: dkms / 2.2.0.3-2

fix_have_one_kernel_for_non-zero_return_code.diff Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
Description: Fixes function have_one_kernel in dkms script for non-zero return code
Author: Mario Limonciello <Mario_Limonciello@Dell.com>
Origin: upstream
Bug-Ubuntu: https://bugs.launchpad.net/bugs/1261116

--- a/dkms
+++ b/dkms
@@ -163,11 +163,14 @@
 
 # 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
 }
 
 # Set up the kernelver and arch arrays.  You must have a 1:1 correspondence --