additional check for 2nd volume
continuous-integration/drone/push Build is passing Details

tests
Alexander 2023-12-28 00:56:47 +04:00
parent 18c88f39cf
commit 91073a50a3
1 changed files with 6 additions and 3 deletions

View File

@ -32,19 +32,22 @@ genOptionalSsh() {
EOF
}
# TODO receive disk device from outside
# TODO receive disk device path from outside
determine2ndDisk() {
local guess rootFsDev
case "$PROVIDER" in
hetzner)
echo "/dev/sdb"
guess="/dev/sdb"
;;
digitalocean)
echo "/dev/sda"
guess="/dev/sda"
;;
*)
return 1
;;
esac
rootFsDev="$(findmnt -no source -T /)"
[[ -b "$guess" && "$guess" != "$rootFsDev" ]] && echo "$guess"
}
# Merge original userdata.json with deployment specific fields and print result.