Bug fixed - variable naming was wrong
This commit is contained in:
parent
c87f3b69b5
commit
253a0cb63f
@ -26,8 +26,8 @@ set -e
|
||||
do_expand_rootfs(){
|
||||
device="/dev/"$(lsblk -idn -o NAME | grep mmcblk0)
|
||||
PARTITIONS=$(($(fdisk -l $device | grep $device | wc -l)-1))
|
||||
PARTSTART=$(parted $LOOP unit s print -sm | tail -1 | cut -d: -f2 | sed 's/s//') # start of first partition
|
||||
PARTEND=$(parted $LOOP unit s print -sm | head -3 | tail -1 | cut -d: -f3 | sed 's/s//') # end of first partition
|
||||
PARTSTART=$(parted $device unit s print -sm | tail -1 | cut -d: -f2 | sed 's/s//') # start of first partition
|
||||
PARTEND=$(parted $device unit s print -sm | head -3 | tail -1 | cut -d: -f3 | sed 's/s//') # end of first partition
|
||||
STARTFROM=$(($PARTEND+1))
|
||||
[[ $PARTITIONS == 1 ]] && STARTFROM=$PARTSTART
|
||||
((echo d; echo $PARTITIONS; echo n; echo p; echo ; echo $STARTFROM; echo ; echo w;) | fdisk $device)>/dev/null
|
||||
|
||||
Loading…
Reference in New Issue
Block a user