Skip to content

Commit

Permalink
luks: avoid `head' usage in clevis luks common functions
Browse files Browse the repository at this point in the history
Use the equivalent `sed' command.
  • Loading branch information
sergio-correia committed Oct 27, 2020
1 parent fce1c16 commit f4cdc93
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/luks/clevis-luks-common-functions
Original file line number Diff line number Diff line change
Expand Up @@ -890,7 +890,7 @@ clevis_luks_first_free_slot() {
if cryptsetup isLuks --type luks1 "${DEV}"; then
first_free_slot=$(cryptsetup luksDump "${DEV}" \
| sed -rn 's|^Key Slot ([0-7]): DISABLED$|\1|p' \
| head -n 1)
| sed -n 1p)
elif cryptsetup isLuks --type luks2 "${DEV}"; then
local used_slots slt
used_slots="$(clevis_luks_used_slots "${DEV}")"
Expand Down

0 comments on commit f4cdc93

Please sign in to comment.