build/scripts/resize2fs

34 lines
615 B
Text
Raw Normal View History

2014-10-08 07:39:24 +02:00
#! /bin/sh
### BEGIN INIT INFO
# Provides: resize2fs
# Required-Start: $local_fs
# Required-Stop:
# Should-Start:
2014-10-12 09:26:41 +02:00
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
2014-10-08 07:39:24 +02:00
# Short-Description: Resize the root filesystem to fill partition
# Description:
### END INIT INFO
set -e
N=/etc/init.d/resize2fs
case "$1" in
start)
2014-10-12 09:26:41 +02:00
echo "Resizing SD card file-system..."
/sbin/resize2fs /dev/mmcblk0p1 2>/dev/null
/sbin/insserv -r resize2fs
2014-10-08 07:39:24 +02:00
;;
2014-10-12 20:37:15 +02:00
stop)
echo "Resizing in next start"
;;
2014-10-08 07:39:24 +02:00
*)
echo "Usage: $N {start}" >&2
exit 1
;;
esac
exit 0