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.
		
		
		
		
		
			
		
			
				
					
					
						
							44 lines
						
					
					
						
							1.5 KiB
						
					
					
				
			
		
		
		
			
			
			
				
					
				
				
					
				
			
		
		
	
	
							44 lines
						
					
					
						
							1.5 KiB
						
					
					
				
								#!/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
							 | 
						|
								
							 | 
						|
								if [ ! -f "/.resize-storage" ] && [ -e "/dev/block/by-name/storage" ] && [ -x "/sbin/blkid" ]; then
							 | 
						|
								  if blkid /dev/block/by-name/storage | grep "ext4"; then
							 | 
						|
								    echo "Resizing storage partition, Do not unplug power!..."
							 | 
						|
								    resize2fs /dev/block/by-name/storage
							 | 
						|
								    touch "/.resize-storage"
							 | 
						|
								  else
							 | 
						|
								    echo "storage partition is not format!..."
							 | 
						|
								    echo "Setup storage partitions, Do not unplug power!..."
							 | 
						|
								    mkfs.ext4 -F /dev/block/by-name/storage
							 | 
						|
								    touch "/.resize-storage"
							 | 
						|
								  fi
							 | 
						|
								fi
							 | 
						|
								
							 | 
						|
								: exit 0
							 | 
						|
								
							 |