Commit 2d2383c6 authored by Lucas Sulzbach's avatar Lucas Sulzbach

WIP: SCRUM#565

parent 6b7e174c
Pipeline #18864 passed with stage
in 14 seconds
......@@ -129,8 +129,9 @@ if [[ -z "${find}" ]]; then
[[ -z "${_INPUT}" ]] && _INPUT="$(get_iso "${ISODIR}" "${ISOURL}")"
cond_mount "${_INPUT}" "${PREFIX}/isobase" iso9660 ro,loop
# TODO: Mount iso in place
mkdir --parents "${TMP}/lower"
lowerdir="${TMP}/lower"
# mkdir --parents "${TMP}/lower"
# lowerdir="${TMP}/lower"
lowerdir="${PREFIX}/isobase"
SQUASHFSPATH="${PREFIX}/isobase/casper/filesystem.squashfs"
else
lowerdir="$(head --lines=1 <<< "${find}")"
......
......@@ -46,16 +46,17 @@ if [[ "${DBG}" == true ]]; then
create_iso_logger --message "Unable to allow ssh root login" --type warning
fi
mkdir --parents "${TMP}"/image/{casper,isolinux,install,preseed,.disk} || \
create_iso_logger --message "Unable to create necessary directories" --tag "mkdir"
cp /usr/lib/ISOLINUX/isolinux.bin "${TMP}/image/isolinux/" || create_iso_logger \
--message "Unable to copy isolinux.bin to image" --tag "cp"
cp /usr/lib/syslinux/modules/bios/ldlinux.c32 "${TMP}/image/isolinux/" || \
create_iso_logger --message "Unable to copy ldlinux.c32 to image" --tag "cp"
cp "${PREFIX}"/src/isolinux/* "${TMP}/image/isolinux/" || create_iso_logger \
--message "Unable to copy isolinux files to image" --tag "cp"
# mkdir --parents "${TMP}"/image/{casper,isolinux,install,preseed,.disk} || \
# create_iso_logger --message "Unable to create necessary directories" --tag "mkdir"
# cp /usr/lib/ISOLINUX/isolinux.bin "${TMP}/image/isolinux/" || create_iso_logger \
# --message "Unable to copy isolinux.bin to image" --tag "cp"
# cp /usr/lib/syslinux/modules/bios/ldlinux.c32 "${TMP}/image/isolinux/" || \
# create_iso_logger --message "Unable to copy ldlinux.c32 to image" --tag "cp"
# cp "${PREFIX}"/src/isolinux/* "${TMP}/image/isolinux/" || create_iso_logger \
# --message "Unable to copy isolinux files to image" --tag "cp"
cp "${PREFIX}/src/${PROFILE}/preseed.cfg" "${TMP}/image/preseed/" || \
create_iso_logger --message "Unable to copy preseed to image" --tag "cp"
if [[ "${DBG}" == true ]]; then
# Enables apport after installation
sed --in-place "s/##APPORT##/1/" "${TMP}/image/preseed/preseed.cfg" || \
......@@ -65,28 +66,31 @@ else
sed --in-place "s/##APPORT##/0/" "${TMP}/image/preseed/preseed.cfg" || \
create_iso_logger --message "Unable to set up preseed to disable apport"
fi
cp "${PREFIX}/src/keyboard" "${CHROOTDIR}/etc/default/" || create_iso_logger \
--message "Unable to copy default keyboard layout" --type warning --tag "cp"
# iso9660 setup
size="$(du --summarize --block-size=1 "${CHROOTDIR}" | cut --fields=1)" || \
create_iso_logger --message "Unable to get the size of chroot" --tag "du"
if test "${size}" -eq 0; then
if [[ "${size}" == 0 ]]; then
create_iso_logger --message "The chroot returns size 0" --tag "du"
fi
echo "${size}" > "${TMP}/image/casper/filesystem.size"
cp "${PREFIX}/src/README.diskdefines" "${TMP}/image/" || create_iso_logger \
--message "Unable to copy README.diskdefines to image" --tag "cp"
# cp "${PREFIX}/src/README.diskdefines" "${TMP}/image/" || create_iso_logger \
# --message "Unable to copy README.diskdefines to image" --tag "cp"
sed --in-place "s/##DISKNAME##/${NAME}/" "${TMP}/image/README.diskdefines" || \
create_iso_logger --message "Unable to set up DISKNAME on README.diskdefines"
pushd "${TMP}/image/" || create_iso_logger --message \
"Unable to change directory" --tag "pushd"
ln --symbolic --force --no-dereference . ubuntu || create_iso_logger --message \
"Unable to create ${TMP}/image/ubuntu symbolic link" --tag "ln"
# ln --symbolic --force --no-dereference . ubuntu || create_iso_logger --message \
# "Unable to create ${TMP}/image/ubuntu symbolic link" --tag "ln"
popd || create_iso_logger --message "Unable to change directory" --tag "popd"
touch "${TMP}/image/.disk/base_installable" || create_iso_logger --message \
"Unable to create ${TMP}/image/.disk/base_installable" --tag "touch"
echo "full_cd/single" > "${TMP}/image/.disk/cd_type" || \
create_iso_logger --message "Unable to set ${TMP}/image/.disk/cd_type" --tag \
"echo"
# touch "${TMP}/image/.disk/base_installable" || create_iso_logger --message \
# "Unable to create ${TMP}/image/.disk/base_installable" --tag "touch"
# echo "full_cd/single" > "${TMP}/image/.disk/cd_type" || \
# create_iso_logger --message "Unable to set ${TMP}/image/.disk/cd_type" --tag \
# "echo"
sed 's/ /-/' <<< "${NAME}" > "${TMP}/image/.disk/info" || \
create_iso_logger --message "Unable to set ${TMP}/image/.disk/info" --tag "echo"
echo "${WEBSITE}" > "${TMP}/image/.disk/release_notes_url" || create_iso_logger \
......@@ -97,10 +101,6 @@ sed --in-place "s/GRUB_DISTRIBUTOR=.*/GRUB_DISTRIBUTOR=\"${NAME}\"/" \
"${CHROOTDIR}/etc/default/grub" || create_iso_logger --message \
"Unable to change distributor in grub default file" --type warning --tag "sed"
sed --in-place "s/PRETTY_NAME=.*/PRETTY_NAME=\"${NAME}\"/" \
"${CHROOTDIR}/usr/lib/os-release" || create_iso_logger --message \
"Unable to change pretty name in os-release file" --type warning --tag "sed"
cp "${PREFIX}/src/lsb-release" "${CHROOTDIR}/etc/" || create_iso_logger \
--message "Unable to copy lsb-release file to chroot" --type warning --tag "cp"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment