mirror of
https://github.com/brain-hackers/brain-config.git
synced 2025-01-03 18:10:07 +09:00
for now refuse to work on anything but trivial partitionings
In particular, refuse to work on NOOBS (parted doesn't like the partition layout). Reassure users that if using NOOBS, the rootfs is already expanded.
This commit is contained in:
parent
bcb12a3ddf
commit
e48f327a17
@ -44,6 +44,13 @@ do_expand_rootfs() {
|
|||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# NOTE: the NOOBS partition layout confuses parted. For now, let's only
|
||||||
|
# agree to work with a sufficiently simple partition layout
|
||||||
|
if [ "$PART_NUM" -ne 2 ]; then
|
||||||
|
whiptail --msgbox "Your partition layout is not currently supported by this tool. You are probably using NOOBS, in which case your root filesystem is already expanded anyway." 20 60 2
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
|
||||||
LAST_PART_NUM=$(parted /dev/mmcblk0 -ms unit s p | tail -n 1 | cut -f 1 -d:)
|
LAST_PART_NUM=$(parted /dev/mmcblk0 -ms unit s p | tail -n 1 | cut -f 1 -d:)
|
||||||
|
|
||||||
if [ "$LAST_PART_NUM" != "$PART_NUM" ]; then
|
if [ "$LAST_PART_NUM" != "$PART_NUM" ]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user