diff options
author | Jan Wagner <mail@jwagner.eu> | 2016-04-19 15:10:50 +0200 |
---|---|---|
committer | Jan Wagner <mail@jwagner.eu> | 2016-04-19 15:10:50 +0200 |
commit | d0f91512d9ca6d361d8a4a387094c48aab00e111 (patch) | |
tree | b00ed220e2fa04bdb1db43475a8149d01d1be5db /files/initramfs/expand-premount | |
parent | 7878e85af7748d531a64f459723dca76ee37914b (diff) | |
download | rpi2-gen-image-d0f91512d9ca6d361d8a4a387094c48aab00e111.tar.gz rpi2-gen-image-d0f91512d9ca6d361d8a4a387094c48aab00e111.tar.bz2 rpi2-gen-image-d0f91512d9ca6d361d8a4a387094c48aab00e111.zip |
Diffstat (limited to 'files/initramfs/expand-premount')
-rwxr-xr-x | files/initramfs/expand-premount | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/files/initramfs/expand-premount b/files/initramfs/expand-premount new file mode 100755 index 0000000..c0c5582 --- /dev/null +++ b/files/initramfs/expand-premount @@ -0,0 +1,19 @@ +#!/bin/sh + +set -e + +# Check for cryptdevice variable +if [ -z "$cryptdevice" ] ; then + echo "unable to get cryptdevice variable (local-premount)" + exit 1 +fi + +if [ -n "$ROOT" ] ; then + # Resize encrypted root partition + cryptsetup resize "${ROOT}" + e2fsck -fp "${ROOT}" + resize2fs -f "${ROOT}" + e2fsck -fp "${ROOT}" +fi + +exit 0 |