Allow for installer and architecture-specific tools packages.

This commit is contained in:
Jeffrey Townsend
2016-05-10 19:47:05 +00:00
parent 0545803bb0
commit fb55df63fd

View File

@@ -198,10 +198,21 @@ installer_blockdev_format() {
installer_umount_blockdev ${blockdev}
installer_say "Formatting ${blockdev} as ${partition1size}:${partition2size}:${partition3size}:${partition4size}."
echo -e "o\nn\np\n1\n\n+${partition1size}\nn\np\n2\n\n+${partition2size}\nn\np\n3\n\n+${partition3size}\nn\np\n4\n\n${partition4size}\np\nw\n" | fdisk /dev/${blockdev}
installer_partition_format ${blockdev} 1 mkfs.ext2 "-L ONL-BOOT"
installer_partition_format ${blockdev} 2 mkfs.ext2 "-L ONL-CONFIG"
installer_partition_format ${blockdev} 3 mkfs.ext2 "-L ONL-IMAGES"
installer_partition_format ${blockdev} 4 mkfs.ext2 "-L ONL-DATA"
_mkfs="mkfs.ext2"
_archtools="${installer_dir}/`uname -m`"
if [ -f "${_archtools}/mkfs.ext2" ]; then
chmod a+x ${_archtools}/*
echo "Using installer archtools mkfs.ext2..."
_mkfs="${_archtools}/mkfs.ext2"
ls -l "${_archtools}"
fi
installer_partition_format ${blockdev} 1 $_mkfs "-L ONL-BOOT"
installer_partition_format ${blockdev} 2 $_mkfs "-L ONL-CONFIG"
installer_partition_format ${blockdev} 3 $_mkfs "-L ONL-IMAGES"
installer_partition_format ${blockdev} 4 $_mkfs "-L ONL-DATA"
if [ -f $ONL_CONFIG_TARBALL ]; then
installer_say "Restoring the contents of the existing ONL-CONFIG partition..."