initcpio: rm overlayfs code from aufs; confused files

This commit is contained in:
udeved 2016-10-12 12:46:20 +02:00
parent a7ec459d6f
commit 94c5d1ca56
4 changed files with 36 additions and 36 deletions

Binary file not shown.

View file

@ -42,10 +42,10 @@ _mnt_overlayfs() {
local src="${1}"
local newroot="${2}"
local mnt="${3}"
local work_dir=/run/miso/cowspace/${cow_directory}/aufs
mkdir -p ${work_dir}
# msg "::: Adding new aufs branch: ${src} to ${newroot}${mnt}"
# mount -t aufs aufs -o remount,append:"${src}"=ro "${newroot}${mnt}"
mount -t aufs -o br=${work_dir}=rw:"${src}"=ro none "${newroot}${mnt}"
mount -t aufs aufs -o remount,append:"${src}"=ro "${newroot}${mnt}"
}
# args: /path/to/image_file, mountpoint
@ -154,34 +154,38 @@ miso_mount_handler() {
fi
if [[ "${checksum}" == "y" ]]; then
if [[ -f "/run/miso/bootmnt/${misobasedir}/${arch}/airootfs.md5" ]]; then
msg -n ":: Self-test requested, please wait..."
if _verify_checksum; then
msg "done. Checksum is OK, continue booting."
for fs in rootfs desktopfs mhwdfs livefs;do
if [[ -f "/run/miso/bootmnt/${misobasedir}/${arch}/${fs}.md5" ]]; then
msg -n ":: Self-test requested, please wait..."
if _verify_checksum "${fs}"; then
msg "done. Checksum is OK, continue booting."
else
echo "ERROR: one or more files are corrupted"
echo "see /tmp/checksum.log for details"
launch_interactive_shell
fi
else
echo "ERROR: one or more files are corrupted"
echo "see /tmp/checksum.log for details"
echo "ERROR: checksum=y option specified but ${misobasedir}/${arch}/${fs}.md5 not found"
launch_interactive_shell
fi
else
echo "ERROR: checksum=y option specified but ${misobasedir}/${arch}/airootfs.md5 not found"
launch_interactive_shell
fi
done
fi
if [[ "${verify}" == "y" ]]; then
if [[ -f "/run/miso/bootmnt/${misobasedir}/${arch}/airootfs.sfs.sig" ]]; then
msg -n ":: Signature verification requested, please wait..."
if _verify_signature; then
msg "done. Signature is OK, continue booting."
for fs in rootfs desktopfs mhwdfs livefs;do
if [[ -f "/run/miso/bootmnt/${misobasedir}/${arch}/${fs}.sfs.sig" ]]; then
msg -n ":: Signature verification requested, please wait..."
if _verify_signature; then
msg "done. Signature is OK, continue booting."
else
echo "ERROR: one or more files are corrupted"
launch_interactive_shell
fi
else
echo "ERROR: one or more files are corrupted"
echo "ERROR: verify=y option specified but ${misobasedir}/${arch}/${fs}.sfs.sig not found"
launch_interactive_shell
fi
else
echo "ERROR: verify=y option specified but ${misobasedir}/${arch}/airootfs.sfs.sig not found"
launch_interactive_shell
fi
done
fi
if [[ "${copytoram}" == "y" ]]; then
@ -201,15 +205,16 @@ miso_mount_handler() {
fi
mkdir -p -m 0700 "/run/miso/cowspace/${cow_directory}"
local _src=/run/miso/bootmnt/${misobasedir}/${arch}
local _src="/run/miso/bootmnt/${misobasedir}/${arch}"
local _dest="/run/miso/sfs"
for fs in livefs mhwdfs desktopfs rootfs;do
if [[ -f "${_src}/${fs}.sfs" ]]; then
_mnt_sfs "${_src}/${fs}.sfs" "/run/miso/sfs/${fs}"
if [[ -f "/run/miso/sfs/${fs}/${fs}.img" ]]; then
_mnt_dmsnapshot "/run/miso/sfs/${fs}/${fs}.img" "${newroot}" "/"
for sfs in livefs mhwdfs desktopfs rootfs;do
if [[ -f "${_src}/${sfs}.sfs" ]]; then
_mnt_sfs "${_src}/${sfs}.sfs" "${_dest}/${sfs}"
if [[ -f "${_dest}/${sfs}/${sfs}.img" ]]; then
_mnt_dmsnapshot "${_dest}/${sfs}/${sfs}.img" "${newroot}" "/"
else
_mnt_overlayfs "/run/miso/sfs/${fs}" "${newroot}" "/"
_mnt_overlayfs "${_dest}/${sfs}" "${newroot}" "/"
fi
fi
done

View file

@ -44,11 +44,6 @@ _mnt_overlayfs() {
local mnt="${3}"
local work_dir="/run/miso/cowspace/${cow_directory}/workdir"
local upper_dir="/run/miso/cowspace/${cow_directory}/upperdir"
local tmp_mnt="/ro_branch/${img_name}"
mkdir -p "/rw_branch/upper"
mkdir -p "/rw_branch/work"
mount -t overlay overlay -olowerdir="/ro_branch/${img_name}",upperdir="/rw_branch/upper",workdir="/rw_branch/work" "${newroot}/"
mkdir -p "${upper_dir}" "${work_dir}"
mount -t overlay overlay -o lowerdir="${lower_dir}",upperdir="${upper_dir}",workdir="${work_dir}" "${newroot}${mnt}"

View file

@ -21,9 +21,9 @@ build() {
add_file /usr/lib/udev/rules.d/10-dm.rules
add_file /usr/lib/udev/rules.d/95-dm-notify.rules
add_file /usr/lib/initcpio/udev/11-dm-initramfs.rules /usr/lib/udev/rules.d/11-dm-initramfs.rules
if [[ $miso_GNUPG_FD ]]; then
if [[ $MISO_GNUPG_FD ]]; then
mkdir -p "$BUILDROOT$dest"/gpg
gpg --homedir "$BUILDROOT$dest"/gpg --import <&$miso_GNUPG_FD
gpg --homedir "$BUILDROOT$dest"/gpg --import <&$MISO_GNUPG_FD
fi
}