Fix permissions & ownership of copied /etc/resolv.conf
Closes: #857740 [tweaked by Raphaël Hertzog to fix the chown root:root call]
This commit is contained in:
parent
6fa4b5bae9
commit
91d446d93e
|
@ -54,7 +54,7 @@ case "${1}" in
|
|||
if [ -f /etc/resolv.conf ]
|
||||
then
|
||||
# Copy resolv file
|
||||
cp /etc/resolv.conf chroot/etc/resolv.conf
|
||||
cp -a /etc/resolv.conf chroot/etc/resolv.conf
|
||||
fi
|
||||
|
||||
# Creating stage file
|
||||
|
@ -70,7 +70,9 @@ case "${1}" in
|
|||
if [ -e config/includes.chroot/etc/resolv.conf ]
|
||||
then
|
||||
# Copying local resolv.conf
|
||||
cp -a config/includes.chroot/etc/resolv.conf chroot/etc/resolv.conf
|
||||
cp config/includes.chroot/etc/resolv.conf chroot/etc/resolv.conf
|
||||
chmod 644 chroot/etc/resolv.conf
|
||||
chown root:root chroot/etc/resolv.conf
|
||||
rm -f chroot/etc/resolv.conf.orig
|
||||
elif [ -e chroot/etc/resolv.conf.orig ] || [ -L chroot/etc/resolv.conf.orig ]
|
||||
then
|
||||
|
|
Loading…
Reference in New Issue