mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-08-01 15:07:49 +00:00
init: fix offset calculation after busybox fdisk change
This commit is contained in:
parent
7ab73457b8
commit
4bc97b2aa9
@ -876,7 +876,7 @@
|
||||
losetup $LOOP $IMG_FILE
|
||||
|
||||
# check for MBR partititon
|
||||
OFFSET=$(fdisk -u -l $LOOP 2>/dev/null | awk '/^[ ]*Device/{part=1; next}; part{if ($2 == "*") {print $3} else {print $2} ; exit}')
|
||||
OFFSET=$(fdisk -u -l $LOOP 2>/dev/null | awk '/^[ ]*Device/{part=1; next}; part{if ($2 == "*") {print $5} else {print $4} ; exit}')
|
||||
if [ -z "$OFFSET" ]; then
|
||||
# check for GPT partititon
|
||||
OFFSET=$(fdisk -u -l $LOOP 2>/dev/null | awk '/^Number/{part=1; next}; part{print $2; exit}')
|
||||
|
Loading…
x
Reference in New Issue
Block a user