File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -75,9 +75,21 @@ umount_rootfs_all(){
7575 rm " $ROOTFS_LOCK " || fail
7676}
7777
78+ resize_rootfs_interactive (){
79+ [ -f " $ROOTFS_LOCK " ] && fail " rootfs mounted."
80+ echo " Please enter the rootfs size and press Enter (e.g. 1000M):"
81+ if read ROOTFS_SIZE && [ -n " $ROOTFS_SIZE " ]; then
82+ resize2fs " $ROOTFS_IMG " " $ROOTFS_SIZE " || fail " cannot resize."
83+ else
84+ resize2fs " $ROOTFS_IMG " 512M || fail " cannot resize."
85+ fi
86+ }
87+
7888install_rootfs (){
7989 [ -f " $ROOTFS_LOCK " ] && fail " rootfs mounted."
8090 rm -fr " $ROOTFS_IMG " || fail
91+ cp rootfs." $ROOTFS_TYPE " .base " $ROOTFS_IMG " || fail
92+ resize_rootfs_interactive
8193 mount_rootfs_base
8294 curl " $( get_rootfs_tgz_url) " | tar -xvz -C " $ROOTFS_DIR " || fail " download and extract rootfs: failed."
8395 umount_rootfs_all
You can’t perform that action at this time.
0 commit comments