Make default-config an overlay
This allows the root image to remain a [mostly] pristine image, and turns default liveCD configurations into an overlay, rather than copying them into the root image. Signed-off-by: Simo Leone <simo@archlinux.org>
This commit is contained in:
parent
0dfc0a36ca
commit
34e1d6b5dc
@ -58,6 +58,10 @@ run_hook ()
|
|||||||
|
|
||||||
export LOOP_NUM="1"
|
export LOOP_NUM="1"
|
||||||
addon_dir="${BOOT_MOUNT}/addons"
|
addon_dir="${BOOT_MOUNT}/addons"
|
||||||
|
|
||||||
|
# always layer default configuration
|
||||||
|
_mnt_squashfs "default-config.sqfs"
|
||||||
|
|
||||||
if [ -e "${addon_dir}/config" ]; then
|
if [ -e "${addon_dir}/config" ]; then
|
||||||
msg ":: Mounting addons"
|
msg ":: Mounting addons"
|
||||||
while read img mountpoint type; do
|
while read img mountpoint type; do
|
||||||
|
17
mkarchiso
17
mkarchiso
@ -167,15 +167,26 @@ if [ "${command_name}" = "install" -o "${command_name}" = "all" ]; then
|
|||||||
[ "$(basename ${d})" != "local" ] && rm -rf "${d}"
|
[ "$(basename ${d})" != "local" ] && rm -rf "${d}"
|
||||||
done
|
done
|
||||||
|
|
||||||
if [ -e "${instroot}/boot" ]; then
|
# copy over kernel and grub configs for boot
|
||||||
|
if [ -e "${instroot}/boot" -a -e "${DEF_CONFIG_DIR}/boot" ]; then
|
||||||
rm -rf "${isoroot}/boot"
|
rm -rf "${isoroot}/boot"
|
||||||
mv "${instroot}/boot" "${isoroot}"
|
cp -r "${instroot}/boot" "${isoroot}"
|
||||||
|
cp -rf "${DEF_CONFIG_DIR}/boot" "${isoroot}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# TODO: this might belong somewhere else
|
# TODO: this might belong somewhere else
|
||||||
|
mkdir -p "${isoroot}/addons"
|
||||||
if [ -d "${ADDON_DIR}" ]; then
|
if [ -d "${ADDON_DIR}" ]; then
|
||||||
echo "Copying addons from ${ADDON_DIR}..."
|
echo "Copying addons from ${ADDON_DIR}..."
|
||||||
cp -r ${ADDON_DIR} ${isoroot}/addons
|
cp -r ${ADDON_DIR}/* "${isoroot}/addons"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# always make an addon out of DEF_CONFIG_DIR
|
||||||
|
echo "Creating default-config addon..."
|
||||||
|
if [ "${QUIET}" = "y" ]; then
|
||||||
|
mksquashfs "${DEF_CONFIG_DIR}" "${isoroot}/addons/default-config.sqfs" >/dev/null
|
||||||
|
else
|
||||||
|
mksquashfs "${DEF_CONFIG_DIR}" "${isoroot}/addons/default-config.sqfs"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user