mirror of
https://github.com/flatcar/scripts.git
synced 2025-12-10 11:51:42 +01:00
Merge pull request #228 from crawford/ld.so
feat(prod_image_util): Adding support for ld.so configs on tmpfs roots
This commit is contained in:
commit
7d0c08971e
@ -33,6 +33,18 @@ setup_prod_image() {
|
|||||||
sudo rm ${root_fs_dir}/etc/locale.gen
|
sudo rm ${root_fs_dir}/etc/locale.gen
|
||||||
sudo rm -rf ${root_fs_dir}/etc/lvm/
|
sudo rm -rf ${root_fs_dir}/etc/lvm/
|
||||||
|
|
||||||
|
# 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.d ${root_fs_dir}/usr/lib
|
||||||
|
|
||||||
|
sudo ln --symbolic ../usr/lib/ld.so.conf ${root_fs_dir}/etc/ld.so.conf
|
||||||
|
|
||||||
|
# Add a tmpfiles rule that symlink ld.so.conf from /usr into /
|
||||||
|
sudo tee "${root_fs_dir}/usr/lib64/tmpfiles.d/baselayout-ldso.conf" \
|
||||||
|
> /dev/null <<EOF
|
||||||
|
L /etc/ld.so.conf - - - - ../usr/lib/ld.so.conf
|
||||||
|
EOF
|
||||||
|
|
||||||
# clear them out explicitly, so this fails if something else gets dropped
|
# clear them out explicitly, so this fails if something else gets dropped
|
||||||
# into xinetd.d
|
# into xinetd.d
|
||||||
sudo rm ${root_fs_dir}/etc/xinetd.d/rsyncd
|
sudo rm ${root_fs_dir}/etc/xinetd.d/rsyncd
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user