mirror of
https://github.com/flatcar/scripts.git
synced 2025-09-25 15:41:04 +02:00
Merge pull request #335 from marineam/etc
prod_image_util: clean up /etc cleanup code
This commit is contained in:
commit
11af495da8
@ -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…
x
Reference in New Issue
Block a user