OpenVoiceOS/buildroot-external/rootfs-overlay/etc/init.d/S00resize_sdcard

26 lines
368 B
Bash
Executable File

#!/bin/sh
#
# Resize SD card
#
start() {
printf "Resize data partition ..."
parted /dev/mmcblk0 unit % resizepart 2 yes 100% &&
partprobe /dev/mmcblk0 &&
sync &&
resize2fs /dev/mmcblk0p2 &&
chmod -x /etc/init.d/S00resize_sdcard &&
echo "[OK]"
}
case "$1" in
start)
start
;;
*)
echo "Usage: $0 {start}"
exit 1
esac
exit $?