WEBMIN_FW_TCP_INCOMING = 22 80 443 5432 12320 12321
COMMON_OVERLAYS = tomcat tomcat-apache tomcat-welcome tkl-webcp
COMMON_CONF = postfix-local tomcat tkl-webcp apache-vhost
INITRAMFS_PACKAGES = busybox-initramfs casper cryptsetup

include $(FAB_PATH)/common/mk/turnkey/php.mk
include $(FAB_PATH)/common/mk/turnkey/pgsql.mk
include $(FAB_PATH)/common/mk/turnkey.mk

LOOP_DEV:=$(shell losetup -f)
define 	product.iso/pre
        dd if=/dev/zero of=$O/cdroot/casper/10root.squashfs.luks bs=512 count=4096 seek=$(shell ls -l --block-size=512 $O/cdroot/casper/10root.squashfs | cut -d ' ' -f 5)
        losetup $(LOOP_DEV) $O/cdroot/casper/10root.squashfs.luks
        cryptsetup -q luksFormat $(LOOP_DEV)
        cryptsetup luksOpen $(LOOP_DEV) cryptroot
        dd if=$O/cdroot/casper/10root.squashfs of=/dev/mapper/cryptroot bs=512
        cryptsetup luksClose cryptroot
        losetup -d $(LOOP_DEV)
        rm -f $O/cdroot/casper/10root.squashfs
endef

define run-genisoimage
	mkisofs -o $O/product.iso -r -J -l \
                -iso-level 3 \                 
		-V ${ISOLABEL} \
		-b isolinux/isolinux.bin \
		-c isolinux/boot.cat \
		-no-emul-boot \
		-boot-load-size 4 \
		-boot-info-table $O/cdroot/
endef



