clevis-luks-askpass.service does not decrypt with a loop way
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
clevis (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
host envrioment:
version: ubuntu-20.04.2 LTS
kernel: 5.4.0-1043
clevis-systemd: 12-1ubuntu2.
We want to mount the data disk automatically in NBDE way(ref: https:/
The error message after reboot host:
Mar 22 04:37:45 cz-ubuntu20 clevis-
Mar 22 04:37:45 cz-ubuntu20 clevis-
Mar 22 04:37:45 cz-ubuntu20 clevis-
Mar 22 04:37:45 cz-ubuntu20 clevis-
Mar 22 04:37:45 cz-ubuntu20 clevis-
Mar 22 04:37:45 cz-ubuntu20 systemd[1]: clevis-
Mar 22 04:37:45 cz-ubuntu20 systemd[1]: clevis-
And there is a problem with the following code:
// /usr/lib/
1 #!/bin/bash -e
...
...
108 [ "$metadata" == true ] || continue
109 [ "$unlocked" == true ] && continue
110 ((todo++)) # -> exit here
111 done
112
113 if [ $todo -eq 0 ] || [ "$loop" != true ]; then
114 break;
115 fi
because clevis-luks-askpass enable '-e' at first line, and '((todo++))' return 1, so exit at line 110.
we can use the following method to fix this error:
110 todo=$((todo+1))
or
110 ((todo=todo+1))
information type: | Private Security → Public |