Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archiso
diff options
context:
space:
mode:
authorGerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>2014-06-28 00:35:50 -0300
committerGerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>2014-06-28 00:35:50 -0300
commit36459f3acc217ff6a0b4ad1b6049d68a8da413e2 (patch)
treed078f5d6053dc40760eb72e3f5fe1c1820e0757c /archiso
parent9131f83404a5e2b45db9d79711e052ff9eba9c56 (diff)
[archiso] Drop aitab support
Always create one filesystem of a fixed size (32G), format (ext4) and know name "airootfs". Simplify logic a lot.
Diffstat (limited to 'archiso')
-rw-r--r--archiso/initcpio/hooks/archiso29
-rw-r--r--archiso/initcpio/hooks/archiso_pxe_http16
-rwxr-xr-xarchiso/mkarchiso48
3 files changed, 18 insertions, 75 deletions
diff --git a/archiso/initcpio/hooks/archiso b/archiso/initcpio/hooks/archiso
index 66a6273..d6ca443 100644
--- a/archiso/initcpio/hooks/archiso
+++ b/archiso/initcpio/hooks/archiso
@@ -101,7 +101,7 @@ _verify_checksum() {
}
run_hook() {
- [[ -z "${arch}" ]] && arch="$(uname -m)"
+ arch="$(uname -m)"
[[ -z "${cowspace_size}" ]] && cowspace_size="75%"
[[ -z "${copytoram_size}" ]] && copytoram_size="75%"
[[ -z "${archisobasedir}" ]] && archisobasedir="arch"
@@ -113,12 +113,6 @@ run_hook() {
cowfile_size=${cowfile_size/%}
fi
- if [[ -z "${aitab}" ]]; then
- aitab="/run/archiso/bootmnt/${archisobasedir}/aitab"
- else
- aitab="/run/archiso/bootmnt/${archisobasedir}/${aitab}"
- fi
-
if [[ -n "${cow_label}" ]]; then
cow_device="/dev/disk/by-label/${cow_label}"
[[ -z "${cow_persistent}" ]] && cow_persistent="P"
@@ -147,14 +141,6 @@ archiso_mount_handler() {
fi
fi
-
- if [[ ! -f "${aitab}" ]]; then
- echo "ERROR: '${aitab}' file does not exist."
- echo " Falling back to interactive prompt"
- echo " You can try to fix the problem manually, log out when you are finished"
- launch_interactive_shell
- fi
-
if [[ "${checksum}" == "y" ]]; then
if [[ -f "/run/archiso/bootmnt/${archisobasedir}/checksum.${arch}.md5" ]]; then
msg -n ":: Self-test requested, please wait..."
@@ -188,17 +174,8 @@ archiso_mount_handler() {
fi
mkdir -p "/run/archiso/cowspace/${cow_directory}"
- local aitab_img aitab_mnt aitab_arch aitab_sfs_comp aitab_fs_type aitab_fs_size
- while read aitab_img aitab_mnt aitab_arch aitab_sfs_comp aitab_fs_type aitab_fs_size; do
- [[ "${aitab_img#\#}" != "${aitab_img}" ]] && continue
- [[ "${aitab_arch}" != "any" && "${aitab_arch}" != "${arch}" ]] && continue
- if [[ "${aitab_fs_type}" != "none" ]]; then
- _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}"
- else
- _mnt_sfs "/run/archiso/bootmnt/${archisobasedir}/${aitab_arch}/${aitab_img}.sfs" "${newroot}${aitab_mnt}"
- fi
- done < "${aitab}"
+ _mnt_sfs "/run/archiso/bootmnt/${archisobasedir}/${arch}/airootfs.fs.sfs" "/run/archiso/sfs/airootfs"
+ _mnt_fs "/run/archiso/sfs/airootfs/airootfs.fs" "${newroot}" "/"
if [[ "${copytoram}" == "y" ]]; then
umount /run/archiso/bootmnt
diff --git a/archiso/initcpio/hooks/archiso_pxe_http b/archiso/initcpio/hooks/archiso_pxe_http
index 32e8ab0..001b486 100644
--- a/archiso/initcpio/hooks/archiso_pxe_http
+++ b/archiso/initcpio/hooks/archiso_pxe_http
@@ -34,21 +34,7 @@ archiso_pxe_http_mount_handler () {
mkdir -p "/run/archiso/httpspace"
mount -t tmpfs -o size="${archiso_http_spc}",mode=0755 httpspace "/run/archiso/httpspace"
- local _aitab_url="${archiso_http_srv}${aitab#/run/archiso/bootmnt/}"
- local _aitab_file="/run/archiso/httpspace/${aitab#/run/archiso/bootmnt/}"
-
- _curl_get "${_aitab_url}" "/"
-
- local aitab_img aitab_mnt aitab_arch aitab_sfs_comp aitab_fs_type aitab_fs_size
- while read aitab_img aitab_mnt aitab_arch aitab_sfs_comp aitab_fs_type aitab_fs_size; do
- [[ "${aitab_img#\#}" != "${aitab_img}" ]] && continue
- [[ "${aitab_arch}" != "any" && "${aitab_arch}" != "${arch}" ]] && continue
- if [[ "${aitab_fs_type}" != "none" ]]; then
- _curl_get "${archiso_http_srv}${archisobasedir}/${aitab_arch}/${aitab_img}.fs.sfs" "/${aitab_arch}"
- else
- _curl_get "${archiso_http_srv}${archisobasedir}/${aitab_arch}/${aitab_img}.sfs" "/${aitab_arch}"
- fi
- done < "${_aitab_file}"
+ _curl_get "${archiso_http_srv}${archisobasedir}/${arch}/airootfs.fs.sfs" "/${arch}"
if [[ "${checksum}" == "y" ]]; then
_curl_get "${archiso_http_srv}${archisobasedir}/checksum.${arch}.md5" "/"
diff --git a/archiso/mkarchiso b/archiso/mkarchiso
index 115d5e0..8325608 100755
--- a/archiso/mkarchiso
+++ b/archiso/mkarchiso
@@ -304,11 +304,7 @@ command_checksum () {
_msg_info "Creating checksum file for self-test (${_chk_arch})..."
cd "${work_dir}/iso/${install_dir}"
if [[ -d "${_chk_arch}" ]]; then
- md5sum aitab > checksum.${_chk_arch}.md5
- find ${_chk_arch} -type f -print0 | xargs -0 md5sum >> checksum.${_chk_arch}.md5
- if [[ -d "any" ]]; then
- find any -type f -print0 | xargs -0 md5sum >> checksum.${_chk_arch}.md5
- fi
+ find ${_chk_arch} -type f -print0 | xargs -0 md5sum > checksum.${_chk_arch}.md5
fi
cd ${OLDPWD}
_msg_info "Done!"
@@ -375,39 +371,23 @@ command_iso () {
fi
}
-# Parse aitab and create each filesystem specified on that, and push it in "iso" directory.
+# create airootfs.fs.sfs filesystem, and push it in "iso" directory.
command_prepare () {
- if [[ ! -f "${work_dir}/iso/${install_dir}/aitab" ]]; then
- _msg_error "The file '${work_dir}/iso/${install_dir}/aitab' does not exist." 1
- fi
_show_config prepare
_cleanup
- local _aitab_img _aitab_mnt _aitab_arch _aitab_sfs_comp _aitab_fs_type _aitab_fs_size
- while read _aitab_img _aitab_mnt _aitab_arch _aitab_sfs_comp _aitab_fs_type _aitab_fs_size ; do
- if [[ ${_aitab_img} =~ ^# ]]; then
- continue
- fi
- if [[ "${_aitab_arch}" != "any" && "${_aitab_arch}" != "${arch}" ]]; then
- continue
- fi
- local _src="${work_dir}/${_aitab_img}"
- local _dst="${work_dir}/iso/${install_dir}/${_aitab_arch}"
- mkdir -p "${_dst}"
- if [[ ${_aitab_fs_type} != "none" ]]; then
- if _is_directory_changed "${_src}" "${_dst}/${_aitab_img}.fs.sfs"; then
- _mkfs ${_aitab_img}
- _mksfs ${_aitab_img}.fs
- mv "${_src}.fs.sfs" "${_dst}"
- rm "${_src}.fs"
- fi
- else
- if _is_directory_changed "${_src}" "${_dst}/${_aitab_img}.sfs"; then
- _mksfs ${_aitab_img}
- mv "${work_dir}/${_aitab_img}.sfs" "${_dst}"
- fi
- fi
- done < "${work_dir}/iso/${install_dir}/aitab"
+
+ local _src="${work_dir}/airootfs"
+ local _dst="${work_dir}/iso/${install_dir}/${arch}"
+
+ mkdir -p "${_dst}"
+
+ if _is_directory_changed "${_src}" "${_dst}/airootfs.fs.sfs"; then
+ _mkfs airootfs
+ _mksfs airootfs.fs
+ mv "${_src}.fs.sfs" "${_dst}"
+ rm "${_src}.fs"
+ fi
}
# Install packages on airootfs.