#!/bin/sh ### BEGIN INIT INFO # Provides: aafirstboot # Required-Start: $remote_fs $all # Required-Stop: # Default-Start: 2 3 4 5 S # Default-Stop: # Short-Description: First boot system setup ### END INIT INFO PATH=/sbin:/usr/sbin:/bin:/usr/bin if [ -f /.first_boot ]; then mkdir -p /media/boot # ok, its the very first boot, we need to resize the disk. p2_start=`fdisk -l /dev/mmcblk0 | grep mmcblk0p2 | awk '{print $2}'` p2_finish=`fdisk -l /dev/mmcblk0 | grep sectors | awk '{printf $5}'` fdisk /dev/mmcblk0 <