mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-nixos-infect.git
synced 2024-11-25 05:01:26 +00:00
additional check for 2nd volume
This commit is contained in:
parent
18c88f39cf
commit
91073a50a3
|
@ -32,19 +32,22 @@ genOptionalSsh() {
|
||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
|
|
||||||
# TODO receive disk device from outside
|
# TODO receive disk device path from outside
|
||||||
determine2ndDisk() {
|
determine2ndDisk() {
|
||||||
|
local guess rootFsDev
|
||||||
case "$PROVIDER" in
|
case "$PROVIDER" in
|
||||||
hetzner)
|
hetzner)
|
||||||
echo "/dev/sdb"
|
guess="/dev/sdb"
|
||||||
;;
|
;;
|
||||||
digitalocean)
|
digitalocean)
|
||||||
echo "/dev/sda"
|
guess="/dev/sda"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
return 1
|
return 1
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
rootFsDev="$(findmnt -no source -T /)"
|
||||||
|
[[ -b "$guess" && "$guess" != "$rootFsDev" ]] && echo "$guess"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Merge original userdata.json with deployment specific fields and print result.
|
# Merge original userdata.json with deployment specific fields and print result.
|
||||||
|
|
Loading…
Reference in a new issue