Skip to content

Commit 321fc34

Browse files
lcharreauLouis Charreau
andauthored
Use awk instead of cut to extract the device field from $IP (#523)
Co-authored-by: Louis Charreau <[email protected]>
1 parent 4cc60de commit 321fc34

File tree

1 file changed

+1
-1
lines changed
  • src/initramfs-tools/scripts/local-top

1 file changed

+1
-1
lines changed

src/initramfs-tools/scripts/local-top/clevis.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ clevis_all_netbootable_devices() {
221221
}
222222

223223
get_specified_device() {
224-
local dev="$(echo $IP | cut -d: -f6)"
224+
local dev="$(echo $IP | awk -F: '{ print $6 }')"
225225
[ -z "$dev" ] || echo $dev
226226
}
227227

0 commit comments

Comments
 (0)