mirror of
https://github.com/mynodebtc/mynode.git
synced 2024-11-11 16:09:16 +00:00
Merge branch 'master' of github.com:mynodebtc/mynode
This commit is contained in:
commit
06b0ed6ba1
|
@ -64,7 +64,16 @@ if [ ! -f /var/lib/mynode/.expanded_rootfs ]; then
|
|||
X86_ROOT_PARTITION="$(mount | grep ' / ' | cut -d ' ' -f1)"
|
||||
X86_DEVICE="$(lsblk -no pkname $X86_ROOT_PARTITION)"
|
||||
X86_DEVICE_PATH="/dev/$X86_DEVICE"
|
||||
case "$X86_DEVICE" in
|
||||
sd* | hd* | vd*)
|
||||
# SATA
|
||||
X86_PARTITION_NUMBER=$(cat /proc/partitions | grep -c "${X86_DEVICE}[0-9]")
|
||||
;;
|
||||
nvme*)
|
||||
# NVMe
|
||||
X86_PARTITION_NUMBER=$(cat /proc/partitions | grep -c "${X86_DEVICE}p[0-9]")
|
||||
;;
|
||||
esac
|
||||
X86_FDISK_TYPE=$(fdisk -l "$X86_DEVICE_PATH" | grep "Disklabel")
|
||||
echo "Root Partition: $X86_ROOT_PARTITION"
|
||||
echo "Root Device: $X86_DEVICE"
|
||||
|
|
Loading…
Reference in New Issue
Block a user