Merge pull request #335 from marineam/etc

prod_image_util: clean up /etc cleanup code
This commit is contained in:
Michael Marineau 2014-09-25 16:55:41 -07:00
commit 11af495da8

View File

@ -53,10 +53,8 @@ create_prod_image() {
# clean-ups of things we do not need
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 ${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 /
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
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
local disable_read_write=${FLAGS_enable_rootfs_verification}
if ! mountpoint -q "${root_fs_dir}/usr"; then