Skip to content

Commit

Permalink
[ci skip] 2024.12.23-33360
Browse files Browse the repository at this point in the history
  • Loading branch information
cybozu-neco committed Dec 23, 2024
2 parents 6765b49 + 30a18fc commit ec24c74
Showing 1 changed file with 19 additions and 12 deletions.
31 changes: 19 additions & 12 deletions ignitions/roles/ss2/files/etc/udev/crypt-base-path
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,25 @@ UDEV_LINKS=$(udevadm info -q symlink -n /dev/$CRYPT_DEV)
output_log "CRYPT_DEV: $CRYPT_DEV DISK_DEV:$DISK_DEV"
output_log "UDEV_LINKS:$UDEV_LINKS"

for symlink in $UDEV_LINKS; do
case ${symlink} in
disk/by-path/virtio-*)
;;
disk/by-path/*-ata-*)
;;
disk/by-path/*)
output_log "find a symlink:$symlink"
CRYPT_BASE_PATH=${symlink#disk/by-path/}
;;
esac
done
if grep -q BOSS /sys/block/$CRYPT_DEV/device/model; then
# ignore the BOSS disk
else
for symlink in $UDEV_LINKS; do
if grep -q BOSS /sys/block/$sd/device/model; then
echo /dev/mapper/crypt-$sd
fi
case ${symlink} in
disk/by-path/virtio-*)
;;
disk/by-path/*-ata-*)
;;
disk/by-path/*)
output_log "find a symlink:$symlink"
CRYPT_BASE_PATH=${symlink#disk/by-path/}
;;
esac
done
fi

if [ -z "$CRYPT_BASE_PATH" ]; then
output_log "could not find symlinks"
Expand Down

0 comments on commit ec24c74

Please sign in to comment.