mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-07 21:16:57 +02:00
build_library: Drop ISO/PXE support for amd64-generic
This commit is contained in:
parent
80977c015e
commit
cb8b8f34ca
@ -574,25 +574,11 @@ _write_cpio_common() {
|
|||||||
local dst_dir=$(_dst_dir)
|
local dst_dir=$(_dst_dir)
|
||||||
local vmlinuz_name="$(_dst_name ".vmlinuz")"
|
local vmlinuz_name="$(_dst_name ".vmlinuz")"
|
||||||
local base_dir="${VM_TMP_ROOT}/usr"
|
local base_dir="${VM_TMP_ROOT}/usr"
|
||||||
local squashfs="usr.squashfs"
|
|
||||||
|
|
||||||
sudo mkdir -p "${cpio_target}/etc"
|
sudo mkdir -p "${cpio_target}/etc"
|
||||||
|
|
||||||
# If not a /usr image pack up root instead
|
# Inject /usr/.noupdate into squashfs to disable update_engine
|
||||||
if ! mountpoint -q "${base_dir}"; then
|
echo "/.noupdate f 444 root root echo -n" >"${VM_TMP_DIR}/extra"
|
||||||
base_dir="${VM_TMP_ROOT}"
|
|
||||||
squashfs="newroot.squashfs"
|
|
||||||
|
|
||||||
# The STATE partition and all of its bind mounts shouldn't be
|
|
||||||
# packed into the squashfs image. Just ROOT.
|
|
||||||
sudo umount --all-targets "${VM_TMP_ROOT}/media/state"
|
|
||||||
|
|
||||||
# Inject /usr/.noupdate into squashfs to disable update_engine
|
|
||||||
echo "/usr/.noupdate f 444 root root echo -n" >"${VM_TMP_DIR}/extra"
|
|
||||||
else
|
|
||||||
# Inject /usr/.noupdate into squashfs to disable update_engine
|
|
||||||
echo "/.noupdate f 444 root root echo -n" >"${VM_TMP_DIR}/extra"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Set correct group for PXE/ISO, which has no writeable /etc
|
# Set correct group for PXE/ISO, which has no writeable /etc
|
||||||
echo /usr/share/coreos/update.conf f 644 root root \
|
echo /usr/share/coreos/update.conf f 644 root root \
|
||||||
@ -601,7 +587,7 @@ _write_cpio_common() {
|
|||||||
|
|
||||||
# Build the squashfs, embed squashfs into a gzipped cpio
|
# Build the squashfs, embed squashfs into a gzipped cpio
|
||||||
pushd "${cpio_target}" >/dev/null
|
pushd "${cpio_target}" >/dev/null
|
||||||
sudo mksquashfs "${base_dir}" "./${squashfs}" -pf "${VM_TMP_DIR}/extra"
|
sudo mksquashfs "${base_dir}" "./usr.squashfs" -pf "${VM_TMP_DIR}/extra"
|
||||||
find . | cpio -o -H newc | gzip > "$2"
|
find . | cpio -o -H newc | gzip > "$2"
|
||||||
popd >/dev/null
|
popd >/dev/null
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user