image: fix "ignored null byte in input" warning on AWS

This commit is contained in:
Nils Hanke 2023-01-17 21:25:04 +01:00 committed by GitHub
parent f0f109a1ea
commit 912384a87d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -12,7 +12,7 @@ AWS_STATE_DISK_SYMLINK="/dev/${AWS_STATE_DISK_DEVICENAME}"
# hack: aws nvme udev rules are never executed. Create symlinks for the nvme devices manually. # hack: aws nvme udev rules are never executed. Create symlinks for the nvme devices manually.
while [[ ! -L ${AWS_STATE_DISK_SYMLINK} ]]; do while [[ ! -L ${AWS_STATE_DISK_SYMLINK} ]]; do
for nvmedisk in /dev/nvme*n1; do for nvmedisk in /dev/nvme*n1; do
linkname=$(nvme amzn id-ctrl -b "${nvmedisk}" | tail -c +3072 | tr -d ' ') || true linkname=$(nvme amzn id-ctrl -b "${nvmedisk}" | tail -c +3073 | head -c 32 | tr -d ' ') || true
if [[ -n ${linkname} ]] && [[ ${linkname} == "${AWS_STATE_DISK_DEVICENAME}" ]]; then if [[ -n ${linkname} ]] && [[ ${linkname} == "${AWS_STATE_DISK_DEVICENAME}" ]]; then
ln -s "${nvmedisk}" "${AWS_STATE_DISK_SYMLINK}" ln -s "${nvmedisk}" "${AWS_STATE_DISK_SYMLINK}"
fi fi

View File

@ -43,7 +43,8 @@ install() {
# aws nvme disks # aws nvme disks
inst_multiple \ inst_multiple \
tail \ tail \
tr tr \
head
# azure scsi disks # azure scsi disks
inst_multiple \ inst_multiple \