mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-11 06:56:58 +02:00
prod_image_util: clean up /etc cleanup code
Pruning files via INSTALL_MASK in the profile is a bit more apropriate since it allows us to keep most of that info in one place. The only parts that need to be deleted or adjusted here are inputs and outputs of `env-update` which has to be run after everything is installed. Previously we didn't actually clean up `env.d` at all which lead at least one user to think they should edit those files and run `env-update` themselves but we don't ship that tool on prod images.
This commit is contained in:
parent
f835dd8b9e
commit
da86c34d75
@ -53,10 +53,8 @@ create_prod_image() {
|
|||||||
|
|
||||||
# clean-ups of things we do not need
|
# clean-ups of things we do not need
|
||||||
sudo rm ${root_fs_dir}/etc/csh.env
|
sudo rm ${root_fs_dir}/etc/csh.env
|
||||||
|
sudo rm -rf ${root_fs_dir}/etc/env.d
|
||||||
sudo rm -rf ${root_fs_dir}/var/db/pkg
|
sudo rm -rf ${root_fs_dir}/var/db/pkg
|
||||||
sudo rm ${root_fs_dir}/var/db/Makefile
|
|
||||||
sudo rm ${root_fs_dir}/etc/locale.gen
|
|
||||||
sudo rm -rf ${root_fs_dir}/etc/lvm/
|
|
||||||
|
|
||||||
# Move the ld.so configs into /usr so they can be symlinked from /
|
# Move the ld.so configs into /usr so they can be symlinked from /
|
||||||
sudo mv ${root_fs_dir}/etc/ld.so.conf ${root_fs_dir}/usr/lib
|
sudo mv ${root_fs_dir}/etc/ld.so.conf ${root_fs_dir}/usr/lib
|
||||||
@ -70,11 +68,6 @@ create_prod_image() {
|
|||||||
L+ /etc/ld.so.conf - - - - ../usr/lib/ld.so.conf
|
L+ /etc/ld.so.conf - - - - ../usr/lib/ld.so.conf
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
# clear them out explicitly, so this fails if something else gets dropped
|
|
||||||
# into xinetd.d
|
|
||||||
sudo rm ${root_fs_dir}/etc/xinetd.d/rsyncd
|
|
||||||
sudo rmdir ${root_fs_dir}/etc/xinetd.d
|
|
||||||
|
|
||||||
# Only try to disable rw on /usr if there is a /usr partition
|
# Only try to disable rw on /usr if there is a /usr partition
|
||||||
local disable_read_write=${FLAGS_enable_rootfs_verification}
|
local disable_read_write=${FLAGS_enable_rootfs_verification}
|
||||||
if ! mountpoint -q "${root_fs_dir}/usr"; then
|
if ! mountpoint -q "${root_fs_dir}/usr"; then
|
||||||
|
Loading…
Reference in New Issue
Block a user