Tags: patch
resolv.conf in debootstrap chroot is copied from the resolv.conf on the
host where debootstrap is executed. the file
/usr/lib/debootstrap/functions, contains the line
conditional_cp /etc/resolv.conf "$TARGET"
conditional_cp () {
if [ ! -e "$2/$1" ]; then
if [ -L "$1" ]; then
cat "$1" >"$2/$1"
elif [ -e "$1" ]; then
cp -a "$1" "$2/$1"
fi
fi
}
but when /etc/resolv.conf is a broken symlink. As it is in the debian
installer until the system is rebooted and resolvconf populates it.
the command cat "$1" >"$2/$1" gives a "no such file or directory" and
debootstrap exits abnormally.
a modification to forinstance
conditional_cp () {
if [ ! -e "$2/$1" ]; then
if [ -L "$1" -a -e "$1"]; then
cat "$1" >"$2/$1"
elif [ -e "$1" ]; then
cp -a "$1" "$2/$1"
fi
fi
}
Would check that the source also exsisted before trying to cat it.
Ronny Aasen
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]