Skip to content

Commit ffc58ac

Browse files
committed
dkms: also forbid 'dkms autoinstall -k <KVER1> -k <KVER2>'
autoinstall doesn't have a loop over kernels
1 parent a1b3456 commit ffc58ac

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

dkms.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2956,7 +2956,7 @@ add | build | install)
29562956
${action}_module
29572957
;;
29582958
autoinstall)
2959-
check_all_is_banned $action
2959+
have_one_kernel $action
29602960
check_root && autoinstall
29612961
;;
29622962
match)

run_test.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1126,6 +1126,12 @@ run_with_expected_error 5 dkms autoinstall --all << EOF
11261126
Error! The action autoinstall does not support the --all parameter.
11271127
EOF
11281128

1129+
echo 'Running dkms autoinstall for more than one kernel version (same version twice for this test) (expected error)'
1130+
run_with_expected_error 4 dkms autoinstall -k "${KERNEL_VER}" -k "${KERNEL_VER}" << EOF
1131+
1132+
Error! The action autoinstall does not support multiple kernel version parameters on the command line.
1133+
EOF
1134+
11291135
echo 'Running dkms autoinstall'
11301136
run_with_expected_output dkms autoinstall -k "${KERNEL_VER}" << EOF
11311137
${SIGNING_PROLOGUE}

0 commit comments

Comments
 (0)