mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-31 14:37:59 +00:00
Merge pull request #2287 from MilhouseVH/le90_fix_busybox_fdisk
init: fix offset calculation after busybox fdisk change
This commit is contained in:
commit
0cb2a40261
@ -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