mirror of
https://github.com/iiab/iiab.git
synced 2025-02-14 20:22:08 +00:00
1-prep/templates/iiab-expand-rootfs: Avoid reboot
This commit is contained in:
parent
77ab55b72a
commit
b711ac5c06
1 changed files with 6 additions and 6 deletions
|
@ -11,11 +11,11 @@
|
|||
if [ -f /.expand-rootfs ] || [ -f /.resize-rootfs ]; then
|
||||
echo "$0: Expanding rootfs partition"
|
||||
|
||||
if [ -x /usr/bin/raspi-config ]; then # Raspberry Pi OS
|
||||
# 2022-02-17: Uses do_expand_rootfs() from:
|
||||
# https://github.com/RPi-Distro/raspi-config/blob/master/raspi-config
|
||||
raspi-config --expand-rootfs
|
||||
else # Other Linux OS's
|
||||
# if [ -x /usr/bin/raspi-config ]; then # Raspberry Pi OS
|
||||
# # 2022-02-17: Uses do_expand_rootfs() from:
|
||||
# # https://github.com/RPi-Distro/raspi-config/blob/master/raspi-config
|
||||
# raspi-config --expand-rootfs # REQUIRES A REBOOT
|
||||
# else # REQUIRES NO REBOOT; works on all OS's
|
||||
# 2022-03-15: Borrows from above raspi-config URL's do_expand_rootfs()
|
||||
ROOT_PART="$(findmnt / -o SOURCE -n)" # e.g. /dev/sda2 or /dev/mmcblk0p2
|
||||
ROOT_DEV="/dev/$(lsblk -no pkname "$ROOT_PART")" # e.g. /dev/sda or /dev/mmcblk0
|
||||
|
@ -53,7 +53,7 @@ if [ -f /.expand-rootfs ] || [ -f /.resize-rootfs ]; then
|
|||
# # Resize partition
|
||||
# growpart /dev/$root_dev $root_part_no
|
||||
# resize2fs /dev/$root_part
|
||||
fi
|
||||
# fi
|
||||
|
||||
rm -f /.expand-rootfs /.resize-rootfs
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue