Fix permissions and ownership of chroot_hosts and chroot_hostname copied files
Ensure that /etc/hosts and /etc/hostname have safe permissions and the right ownership when copied from include directory. Gbp-Dch: Ignore
This commit is contained in:
parent
5b7d86686c
commit
d2722e8f19
|
@ -75,7 +75,9 @@ EOF
|
|||
fi
|
||||
if [ -n "${INCLUDE_DIR}" ] && [ -e config/"${INCLUDE_DIR}"/etc/hostname ]
|
||||
then
|
||||
cp -a config/"${INCLUDE_DIR}"/etc/hostname chroot/etc/hostname
|
||||
cp config/"${INCLUDE_DIR}"/etc/hostname chroot/etc/hostname
|
||||
chmod 644 chroot/etc/hostname
|
||||
Chroot chroot "chown root:root chroot/etc/hostname"
|
||||
fi
|
||||
|
||||
Echo_message "Deconfiguring file /bin/hostname"
|
||||
|
|
|
@ -79,7 +79,9 @@ EOF
|
|||
fi
|
||||
if [ -n "${INCLUDE_DIR}" ] && [ -e config/"${INCLUDE_DIR}"/etc/hosts ]
|
||||
then
|
||||
cp -a config/"${INCLUDE_DIR}"/etc/hosts chroot/etc/hosts
|
||||
cp config/"${INCLUDE_DIR}"/etc/hosts chroot/etc/hosts
|
||||
chmod 644 chroot/etc/hosts
|
||||
Chroot chroot "chown root:root /etc/hosts"
|
||||
rm -f chroot/etc/hosts.orig
|
||||
elif [ -f chroot/etc/hosts.orig ]
|
||||
then
|
||||
|
|
Loading…
Reference in New Issue