Package: vserver-debiantools Version: 0.5.0 Severity: normal Tags: patch I have trouble with newvserver on my system. It does not generate resolv.conf correctly. The problem seems to be that my eth0 has multiple configured primary addresses (due to other running vservers).
The script magic to the find the local address (in case of localhost nameserver) resolves to something with newlines in it, which causes a 'sed' to fail ("unterminated command" or something like that). Here is a patch that just picks the first address. --- newvserver.orig 2007-11-30 11:05:49.000000000 +0100 +++ newvserver 2007-11-30 11:06:04.000000000 +0100 @@ -508,7 +508,7 @@ # grab DNS servers from the host-server for `resolv.conf' HOST_IP=$(ip -o addr show dev $INTERFACE primary scope global | \ - sed -n 's;.*inet \([^/]*\)/.*;\1;p') + sed -n 's;.*inet \([^/]*\)/.*;\1;p' | head -1) (echo search $VDOMAIN; grep '^nameserver' /etc/resolv.conf | sed "s/127.0.0.1/$HOST_IP/") \ > "$VROOTDIR/$VHOST/etc/resolv.conf" Alternatively, to pick the real primary address for the interface, maybe something like: HOST_IP=$(/sbin/ifconfig $INTERFACE \ | sed -ne 's/.*inet addr:\([0-9.]*\).*/\1/p') -- System Information: Debian Release: lenny/sid APT prefers testing APT policy: (500, 'testing') Architecture: i386 (i686) Kernel: Linux 2.6.22-2-vserver-686 (SMP w/2 CPU cores) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/bash Versions of packages vserver-debiantools depends on: ii binutils 2.18-1 The GNU assembler, linker and bina ii debootstrap 1.0.6 Bootstrap a basic Debian system ii iproute 20070313-1 Professional tools to control the ii rsync 2.6.9-5 fast remote file copy program (lik ii util-vserver 0.30.214-5 user-space tools for Linux-VServer Versions of packages vserver-debiantools recommends: ii dnsutils 1:9.4.1-P1-3 Clients provided with BIND -- no debconf information -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]