vanhofen
6 years ago
5 changed files with 12 additions and 60 deletions
@ -1,16 +0,0 @@ |
|||
#!/bin/sh |
|||
if grep -q mmcblk1 /proc/cmdline |
|||
then |
|||
search=/sys/block/mmcblk1/mmcblk1p* |
|||
else |
|||
search=/sys/block/mmcblk0/mmcblk0p* |
|||
fi |
|||
for i in $search; |
|||
do |
|||
if [ "$i" != "$search" ]; then |
|||
partname=`cat /$i/uevent | grep PARTNAME | cut -d '=' -f 2` |
|||
devname=`cat /$i/uevent | grep DEVNAME | cut -d '=' -f 2` |
|||
mkdir -p /dev/block/by-name/ |
|||
ln -sf /dev/$devname /dev/block/by-name/$partname |
|||
fi |
|||
done |
@ -1,44 +0,0 @@ |
|||
#!/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 |
Loading…
Reference in new issue