mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-nixos-infect.git
synced 2024-11-22 03:51:27 +00:00
additional check for 2nd volume
This commit is contained in:
parent
18c88f39cf
commit
91073a50a3
|
@ -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.
|
||||
|
|
Loading…
Reference in a new issue