1
1
mirror of https://github.com/OpenVoiceOS/OpenVoiceOS synced 2025-01-05 13:28:18 +01:00
OpenVoiceOS/buildroot-external/rootfs-overlay/etc/init.d/S00resize_sdcard
Peter Steenbergen aaf99dfc36 MycroftOS: Buildroot: Change script to startup script
- Script worked manually on the CLI so converting it to init.d script.
2018-11-06 09:02:54 +01:00

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 $?