2016-02-26 23:56:38 +01:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
2020-03-01 22:54:32 +01:00
|
|
|
case "$PACKER_BUILDER_TYPE" in
|
|
|
|
virtualbox-iso)
|
|
|
|
DEVICE=/dev/sda
|
|
|
|
;;
|
|
|
|
qemu)
|
|
|
|
DEVICE=/dev/vda
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
echo "Unsupported packer build $PACKER_BUILDER_TYPE" >&2
|
|
|
|
exit 1
|
|
|
|
esac
|
|
|
|
|
2016-02-26 23:56:38 +01:00
|
|
|
echo "
|
|
|
|
d
|
|
|
|
3
|
|
|
|
n
|
|
|
|
e
|
|
|
|
3
|
|
|
|
|
2016-02-27 00:11:33 +01:00
|
|
|
+3G
|
2016-02-26 23:56:38 +01:00
|
|
|
n
|
|
|
|
p
|
|
|
|
|
|
|
|
|
2020-03-01 22:54:32 +01:00
|
|
|
w" | /sbin/fdisk "$DEVICE" || true
|
2016-02-26 23:56:38 +01:00
|
|
|
/sbin/partprobe
|