You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
#!/bin/sh
|
|
|
|
### BEGIN INIT INFO
|
|
|
|
# Provides: resize2fs mmcblk0p3
|
|
|
|
# Required-Start: $local_fs
|
|
|
|
# Required-Stop: $local_fs
|
|
|
|
# Default-Start: S
|
|
|
|
# Default-Stop:
|
|
|
|
# Short-Description: Resizes once linuxrootfs and userdata to full partition size
|
|
|
|
### END INIT INFO
|
|
|
|
|
|
|
|
if [ ! -f "/.resize-linuxrootfs" ] && [ -e "/dev/block/by-name/linuxrootfs" ]
|
|
|
|
then
|
|
|
|
echo "Resizing linuxrootfs partition, Do not unplug power!..."
|
|
|
|
resize2fs /dev/block/by-name/linuxrootfs
|
|
|
|
touch "/.resize-linuxrootfs"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ ! -f "/.resize-userdata" ] && [ -e "/dev/block/by-name/userdata" ] && [ -x "/sbin/blkid" ]; then
|
|
|
|
if blkid /dev/block/by-name/userdata | grep "ext4"; then
|
|
|
|
echo "Resizing userdata partition, Do not unplug power!..."
|
|
|
|
resize2fs /dev/block/by-name/userdata
|
|
|
|
touch "/.resize-userdata"
|
|
|
|
else
|
|
|
|
echo "userdata partition is not format!..."
|
|
|
|
echo "Setup userdata partitions, Do not unplug power!..."
|
|
|
|
mkfs.ext4 -F /dev/block/by-name/userdata
|
|
|
|
touch "/.resize-userdata"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
: exit 0
|