mirror of
https://github.com/flatcar/scripts.git
synced 2026-05-05 20:26:44 +02:00
fix(build_image): Add fstrim commands for -usr images.
This commit is contained in:
parent
825dfd63ee
commit
7e3dd619d1
@ -60,8 +60,10 @@ create_base_image() {
|
||||
# Zero all fs free space to make it more compressible so auto-update
|
||||
# payloads become smaller, not fatal since it won't work on linux < 3.2
|
||||
sudo fstrim "${root_fs_dir}" || true
|
||||
if [[ -d "${root_fs_dir}/media/state" ]]; then
|
||||
sudo fstrim "${root_fs_dir}/media/state" || true
|
||||
if [[ "${disk_layout}" == *-usr ]]; then
|
||||
sudo fstrim "${root_fs_dir}/usr" || true
|
||||
else
|
||||
sudo fstrim "${root_fs_dir}/media/state" || true
|
||||
fi
|
||||
|
||||
cleanup_mounts "${root_fs_dir}"
|
||||
|
||||
@ -48,8 +48,10 @@ install_dev_packages() {
|
||||
|
||||
# Zero all fs free space, not fatal since it won't work on linux < 3.2
|
||||
sudo fstrim "${root_fs_dir}" || true
|
||||
if [[ -d "${root_fs_dir}/media/state" ]]; then
|
||||
sudo fstrim "${root_fs_dir}/media/state" || true
|
||||
if [[ "${disk_layout}" == *-usr ]]; then
|
||||
sudo fstrim "${root_fs_dir}/usr" || true
|
||||
else
|
||||
sudo fstrim "${root_fs_dir}/media/state" || true
|
||||
fi
|
||||
|
||||
info "Developer image built and stored at ${image_name}"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user