diff options
Diffstat (limited to 'backend/bundlers/cd.inc')
-rw-r--r-- | backend/bundlers/cd.inc | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/backend/bundlers/cd.inc b/backend/bundlers/cd.inc new file mode 100644 index 0000000..6fb5aac --- /dev/null +++ b/backend/bundlers/cd.inc @@ -0,0 +1,12 @@ +<?php +$profile=new sql_gentoo_profile($opts['profile']); +$headers=$profile->get_headers(); +if (strpos($headers['chost'], 'x86_64') === false) + $minimaliso=CACHE.'/cd/install-x86-minimal-20090623.iso'; +else + $minimaliso=CACHE.'/cd/install-amd64-minimal-20090625.iso'; +makedir("$I/boot"); +execute_command('Extract kernel, initrd, and squashfs from CD image ', LIB."/bkisofs-cli '$minimaliso' extract /isolinux/gentoo '$I/boot/kernel' extract /isolinux/gentoo.igz '$I/boot/initrd' extract /image.squashfs '$W/'"); +//file_put_contents("$W/unsquashfs-files", "/lib64/modules\n/lib/modules\n"); +execute_command('Extract kernel modules from SquashFS to image', "unsquashfs -i -d '$W/modules' '$W/image.squashfs' /lib/modules /lib64/modules; cp -avT '$W/modules' '$I'; rm -rf '$W/modules'"); +?> |