[archiso] Cleanup: Remove *.fs support.

This was useful to me during development of dm-snapshot support
to create very quickly isos without wating for SquashFS compression.

Is time to remove this, I think the is no practical usage,
and make the code a bit more simple.

Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
This commit is contained in:
Gerardo Exequiel Pozzi 2011-12-03 11:22:03 -03:00
parent 10d42b18b8
commit 305bca4692
4 changed files with 8 additions and 34 deletions

8
README
View file

@ -178,10 +178,6 @@ if nothing is specified on command line.
* image-name.fs.sfs SquashFS with only one file inside (image-name.fs), * image-name.fs.sfs SquashFS with only one file inside (image-name.fs),
which is an image of some type of filesystem which is an image of some type of filesystem
(ext4, ext3, ext2, xfs), all files reside on it. (ext4, ext3, ext2, xfs), all files reside on it.
* image-name.fs Like image-name.fs.sfs but without SquashFS.
(For testing purposes only. The option copytoram
for archiso hook does not have any effect on these images)
*** File format for aitab. *** File format for aitab.
@ -196,7 +192,6 @@ It consists of some fields which define the behaviour of images.
<mnt> Mount point. <mnt> Mount point.
<arch> Architecture { i686 | x86_64 | any }. <arch> Architecture { i686 | x86_64 | any }.
<sfs_comp> SquashFS compression type { gzip | lzo | xz }. <sfs_comp> SquashFS compression type { gzip | lzo | xz }.
A special value of "none" denotes no usage of SquashFS.
<fs_type> Set the filesystem type of the image { ext4 | ext3 | ext2 | xfs }. <fs_type> Set the filesystem type of the image { ext4 | ext3 | ext2 | xfs }.
A special value of "none" denotes no usage of a filesystem. A special value of "none" denotes no usage of a filesystem.
In that case all files are pushed directly to SquashFS filesystem. In that case all files are pushed directly to SquashFS filesystem.
@ -207,9 +202,6 @@ It consists of some fields which define the behaviour of images.
This is an estimation, and calculated in a simple way. This is an estimation, and calculated in a simple way.
Space used + 10% (estimated for metadata overhead) + desired % Space used + 10% (estimated for metadata overhead) + desired %
Note: Some combinations are invalid, example: sfs_comp=none and fs_type=none
*** Why the /isolinux and /arch/boot/syslinux directories? *** Why the /isolinux and /arch/boot/syslinux directories?

View file

@ -213,12 +213,8 @@ archiso_mount_handler() {
[[ "${aitab_img#\#}" != "${aitab_img}" ]] && continue [[ "${aitab_img#\#}" != "${aitab_img}" ]] && continue
[[ "${aitab_arch}" != "any" && "${aitab_arch}" != "${arch}" ]] && continue [[ "${aitab_arch}" != "any" && "${aitab_arch}" != "${arch}" ]] && continue
if [[ "${aitab_fs_type}" != "none" ]]; then if [[ "${aitab_fs_type}" != "none" ]]; then
if [[ "${aitab_sfs_comp}" != "none" ]]; then
_mnt_sfs "/run/archiso/bootmnt/${archisobasedir}/${aitab_arch}/${aitab_img}.fs.sfs" "/run/archiso/sfs/${aitab_img}" _mnt_sfs "/run/archiso/bootmnt/${archisobasedir}/${aitab_arch}/${aitab_img}.fs.sfs" "/run/archiso/sfs/${aitab_img}"
_mnt_fs "/run/archiso/sfs/${aitab_img}/${aitab_img}.fs" "${newroot}${aitab_mnt}" _mnt_fs "/run/archiso/sfs/${aitab_img}/${aitab_img}.fs" "${newroot}${aitab_mnt}"
else
_mnt_fs "/run/archiso/bootmnt/${archisobasedir}/${aitab_arch}/${aitab_img}.fs" "${newroot}${aitab_mnt}"
fi
else else
_mnt_sfs "/run/archiso/bootmnt/${archisobasedir}/${aitab_arch}/${aitab_img}.sfs" "${newroot}${aitab_mnt}" _mnt_sfs "/run/archiso/bootmnt/${archisobasedir}/${aitab_arch}/${aitab_img}.sfs" "${newroot}${aitab_mnt}"
fi fi

View file

@ -47,11 +47,7 @@ archiso_pxe_curl_mount_handler () {
[[ "${aitab_img#\#}" != "${aitab_img}" ]] && continue [[ "${aitab_img#\#}" != "${aitab_img}" ]] && continue
[[ "${aitab_arch}" != "any" && "${aitab_arch}" != "${arch}" ]] && continue [[ "${aitab_arch}" != "any" && "${aitab_arch}" != "${arch}" ]] && continue
if [[ "${aitab_fs_type}" != "none" ]]; then if [[ "${aitab_fs_type}" != "none" ]]; then
if [[ "${aitab_sfs_comp}" != "none" ]]; then
_curl_get "${archiso_curl_url}${archisobasedir}/${aitab_arch}/${aitab_img}.fs.sfs" "${archisobasedir}/${aitab_arch}" _curl_get "${archiso_curl_url}${archisobasedir}/${aitab_arch}/${aitab_img}.fs.sfs" "${archisobasedir}/${aitab_arch}"
else
_curl_get "${archiso_curl_url}${archisobasedir}/${aitab_arch}/${aitab_img}.fs" "${archisobasedir}/${aitab_arch}"
fi
else else
_curl_get "${archiso_curl_url}${archisobasedir}/${aitab_arch}/${aitab_img}.sfs" "${archisobasedir}/${aitab_arch}" _curl_get "${archiso_curl_url}${archisobasedir}/${aitab_arch}/${aitab_img}.sfs" "${archisobasedir}/${aitab_arch}"
fi fi

View file

@ -363,26 +363,16 @@ command_prepare () {
if [[ ${_aitab_img} =~ ^# ]]; then if [[ ${_aitab_img} =~ ^# ]]; then
continue continue
fi fi
if [[ ${_aitab_sfs_comp} == "none" && ${_aitab_fs_type} == "none" ]]; then
_msg_error "In aitab, both fields 'sfs_comp' and 'fs_type' are set to none for '${_aitab_img}' image" 1
fi
local _src="${work_dir}/${_aitab_img}" local _src="${work_dir}/${_aitab_img}"
local _dst="${work_dir}/iso/${install_dir}/${_aitab_arch}" local _dst="${work_dir}/iso/${install_dir}/${_aitab_arch}"
mkdir -p "${_dst}" mkdir -p "${_dst}"
if [[ ${_aitab_fs_type} != "none" ]]; then if [[ ${_aitab_fs_type} != "none" ]]; then
if [[ ${_aitab_sfs_comp} != "none" ]]; then
if _is_directory_changed "${_src}" "${_dst}/${_aitab_img}.fs.sfs"; then if _is_directory_changed "${_src}" "${_dst}/${_aitab_img}.fs.sfs"; then
_mkfs ${_aitab_img} ${_aitab_fs_type} ${_aitab_fs_size} _mkfs ${_aitab_img} ${_aitab_fs_type} ${_aitab_fs_size}
_mksfs ${_aitab_img}.fs ${_aitab_sfs_comp} _mksfs ${_aitab_img}.fs ${_aitab_sfs_comp}
mv "${_src}.fs.sfs" "${_dst}" mv "${_src}.fs.sfs" "${_dst}"
rm "${_src}.fs" rm "${_src}.fs"
fi fi
else
if _is_directory_changed "${_src}" "${_dst}/${_aitab_img}.fs"; then
_mkfs ${_aitab_img} ${_aitab_fs_type} ${_aitab_fs_size}
mv "${work_dir}/${_aitab_img}.fs" "${_dst}"
fi
fi
else else
if _is_directory_changed "${_src}" "${_dst}/${_aitab_img}.sfs"; then if _is_directory_changed "${_src}" "${_dst}/${_aitab_img}.sfs"; then
_mksfs ${_aitab_img} ${_aitab_sfs_comp} _mksfs ${_aitab_img} ${_aitab_sfs_comp}