diff --git a/initcpio/hooks/miso b/initcpio/hooks/miso index 64041d9..e4b1d1d 100644 --- a/initcpio/hooks/miso +++ b/initcpio/hooks/miso @@ -210,12 +210,12 @@ miso_mount_handler() { local src="/run/miso/bootmnt/${misobasedir}/${arch}" local dest_sfs="/run/miso/sfs" dest_img="/run/miso/img" local lower_dir - mkdir -p ${dest_img} for sfs in livefs mhwdfs desktopfs rootfs;do if [[ -f "${src}/${sfs}.sfs" ]]; then _mnt_sfs "${src}/${sfs}.sfs" "${dest_sfs}/${sfs}" if [[ -f "${dest_sfs}/${sfs}/${sfs}.img" ]]; then + mkdir -p ${dest_img} lower_dir=${lower_dir:-}${lower_dir:+:}"${dest_img}/${sfs}" _mnt_dmsnapshot "${dest_sfs}/${sfs}/${sfs}.img" "${dest_img}/${sfs}" else diff --git a/initcpio/hooks/miso_aufs b/initcpio/hooks/miso_aufs index d44fd5e..8f20d92 100644 --- a/initcpio/hooks/miso_aufs +++ b/initcpio/hooks/miso_aufs @@ -217,12 +217,12 @@ miso_mount_handler() { local src="/run/miso/bootmnt/${misobasedir}/${arch}" local dest_sfs="/run/miso/sfs" dest_img="/run/miso/img" - mkdir -p ${dest_img} for sfs in livefs mhwdfs desktopfs rootfs;do if [[ -f "${src}/${sfs}.sfs" ]]; then _mnt_sfs "${src}/${sfs}.sfs" "${dest_sfs}/${sfs}" if [[ -f "${dest_sfs}/${sfs}/${sfs}.img" ]]; then + mkdir -p ${dest_img} _mnt_dmsnapshot "${dest_sfs}/${sfs}/${sfs}.img" "${dest_img}/${sfs}" _mnt_overlayfs "${dest_img}/${sfs}" "${newroot}" "/" else diff --git a/initcpio/hooks/miso_pxe_common b/initcpio/hooks/miso_pxe_common index d004cbe..d99c641 100644 --- a/initcpio/hooks/miso_pxe_common +++ b/initcpio/hooks/miso_pxe_common @@ -39,11 +39,16 @@ run_hook () { # setup DNS resolver if [[ "${IPV4DNS0}" != "0.0.0.0" ]]; then - echo "nameserver ${IPV4DNS0}" > /etc/resolv.conf + echo "# added by miso_pxe_common hook" > /etc/resolv.conf + echo "nameserver ${IPV4DNS0}" >> /etc/resolv.conf fi if [[ "${IPV4DNS1}" != "0.0.0.0" ]]; then echo "nameserver ${IPV4DNS1}" >> /etc/resolv.conf fi + if [[ -n "${DNSDOMAIN}" ]]; then + echo "search ${DNSDOMAIN}" >> /etc/resolv.conf + echo "domain ${DNSDOMAIN}" >> /etc/resolv.conf + fi fi } diff --git a/initcpio/hooks/miso_pxe_http b/initcpio/hooks/miso_pxe_http index 98f97ff..0907b20 100644 --- a/initcpio/hooks/miso_pxe_http +++ b/initcpio/hooks/miso_pxe_http @@ -3,6 +3,10 @@ run_hook() { if [[ -n "${ip}" && -n "${miso_http_srv}" ]]; then + # booting with http is always copy-to-ram, so set here to make sure + # addresses are flushed and interface is set down + copytoram="y" + miso_http_srv=$(eval echo ${miso_http_srv}) [[ -z "${miso_http_spc}" ]] && miso_http_spc="75%" diff --git a/initcpio/script/miso_shutdown b/initcpio/script/miso_shutdown index 8cb05a2..fb7ed11 100644 --- a/initcpio/script/miso_shutdown +++ b/initcpio/script/miso_shutdown @@ -20,6 +20,10 @@ done # Unmount the space used to store *.cow. umount /oldrun/miso/cowspace +if [[ -d /oldrun/miso/img ]];then + umount /oldrun/miso/img +fi + # Unmount boot device if needed (no copytoram=y used) if [[ ! -d /oldrun/miso/copytoram ]]; then if [[ -d /oldrun/miso/img_dev ]]; then