Hi An even better solution is to actually just change a few files and nothing more. :) I have been thinking about that solution for a few years now...
Thanks anyway for the patch. Best regards, // Ola On Fri, Mar 07, 2008 at 04:56:06PM +0100, Vincent Caron wrote: > Package: vserver-debiantools > Version: 0.3.4 > Severity: important > Tags: patch > > When running dupvserver, a rgrep is used to find occurences of the > 'from' vserver name in files among /etc, replacing those occurences with > the 'to' vserver name. > > In my case, it happened to replace a string inside the emacs binary > itself, having the curious effect of: > - replacing the /etc/alternatives/emacs symlink with a plain file > - this plain file being a crashy emacs (did not survived the sed'ing) > > A simple fix is adding the -I flag to the rgrep calls. It fixes this very > bug. A better fix would probably involve skipping symlinks. > > Proposed patch against Etch version (should apply on Sid's 0.5.0 too which > has the same bug). > > 176,179c176,179 > < FINDTOREPNAME1=$(rgrep "[\" \t]$FROM[\"\t \.]" $VSERVERS_ROOT/$TO/etc/ > 2>&1 | sed -e "s/:.*//;" | grep -v "^grep$") > < FINDTOREPNAME2=$(rgrep "^$FROM[\"\t \.]" $VSERVERS_ROOT/$TO/etc/ 2>&1 | > sed -e "s/:.*//;" | grep -v "^grep$") > < FINDTOREPNAME3=$(rgrep "[\"\t ]$FROM$" $VSERVERS_ROOT/$TO/etc/ 2>&1 | > sed -e "s/:.*//;" | grep -v "^grep$") > < FINDTOREPNAME4=$(rgrep "^$FROM$" $VSERVERS_ROOT/$TO/etc/ 2>&1 | sed -e > "s/:.*//;" | grep -v "^grep$") > --- > > FINDTOREPNAME1=$(rgrep -I "[\" \t]$FROM[\"\t \.]" > > $VSERVERS_ROOT/$TO/etc/ 2>&1 | sed -e "s/:.*//;" | grep -v "^grep$") > > FINDTOREPNAME2=$(rgrep -I "^$FROM[\"\t \.]" $VSERVERS_ROOT/$TO/etc/ > > 2>&1 | sed -e "s/:.*//;" | grep -v "^grep$") > > FINDTOREPNAME3=$(rgrep -I "[\"\t ]$FROM$" $VSERVERS_ROOT/$TO/etc/ 2>&1 > > | sed -e "s/:.*//;" | grep -v "^grep$") > > FINDTOREPNAME4=$(rgrep -I "^$FROM$" $VSERVERS_ROOT/$TO/etc/ 2>&1 | sed > > -e "s/:.*//;" | grep -v "^grep$") > 187c187 > < FINDTOREPIP=$(rgrep "$FROMIP" $VSERVERS_ROOT/$TO/etc/ 2>&1 | sed -e > "s/:.*//;" | grep -v "^grep$" | sort -u) > --- > > FINDTOREPIP=$(rgrep -I "$FROMIP" $VSERVERS_ROOT/$TO/etc/ 2>&1 | sed > > -e "s/:.*//;" | grep -v "^grep$" | sort -u) > > -- System Information: > Debian Release: 4.0 > APT prefers stable > APT policy: (500, 'stable') > Architecture: amd64 (x86_64) > Shell: /bin/sh linked to /bin/bash > Kernel: Linux 2.6.18-6-xen-vserver-amd64 > Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968) > > Versions of packages vserver-debiantools depends on: > ii binutils 2.17-3 The GNU assembler, linker and > bina > ii debootstrap 0.3.3.2etch1 Bootstrap a basic Debian system > ii rsync 2.6.9-2etch1 fast remote file copy program > (lik > ii util-vserver 0.30.212-1 user-space tools for > Linux-VServer > > vserver-debiantools recommends no packages. > > -- no debconf information > > > -- --------------------- Ola Lundqvist --------------------------- / [EMAIL PROTECTED] Annebergsslingan 37 \ | [EMAIL PROTECTED] 654 65 KARLSTAD | | http://opalsys.net/ +46 (0)70-332 1551 | \ gpg/f.p.: 7090 A92B 18FE 7994 0C36 4FE4 18A1 B1CF 0FE5 3DD9 / --------------------------------------------------------------- -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]