Re: [Vserver] Another conceptual newbie question

From: Corey Wright <>
Date: Wed 10 May 2006 - 17:32:37 BST
Message-ID: <43556.corey.1147278757.squirrel@squirrelmail>

On Wed, May 10, 2006 9:20 am, Stephen Harris wrote:
> On Wed, May 10, 2006 at 08:38:57AM -0500, Corey Wright wrote:
>> mv /bin/bash /bin/
>> mv /bin/ /bin/bash
> Do you mean
> mv /bin/bash /bin/bash.old
> cp /bin/bash.old /bin/bash
> ie a cp for the second command?
> I'm not totally familiar with vhashify semantics, but the two commands
> you wrote would leave the inode number unchanged, and so it would still
> be a hard link to the unified file.

DOH! my mistake. i meant for the inode to change (to break the hardlink).

here's what i really do:

$ mv /usr/local/bin/{,.orig}
$ cp -av /usr/local/bin/{.orig,}
$ jmacs /usr/local/bin/

if my changes work:
$ rm /usr/local/bin/

if my changes don't work:
$ rm /usr/local/bin/
$ mv /usr/local/bin/{.orig,}

note: rm is aliased to "rm -i"; very important. :-D

i do this so as to not trip integrit and aide (file integrity verifiers)
because should i revert the changes the inode doesn't change. (otherwise
the next day while reviewing the aide/integrit notification email i'm left
scratching my head for a brief second wondering why it's complaining when
i didn't make any changes and the file's checksum/hash proves it).

in my attempt to synthesize all the above into a two line example, i
accidentally did a double move.

so replace my double move with:
$ mv /bin/bash /bin/
$ cp /bin/ /bin/bash
$ rm /bin/

hopefully my original post helped more than it hurt.

thanks for the catch.


Vserver mailing list
Received on Wed May 10 17:33:13 2006
[Next/Previous Months] [Main vserver Project Homepage] [Howto Subscribe/Unsubscribe] [Paul Sladen's vserver stuff]
Generated on Wed 10 May 2006 - 17:33:18 BST by hypermail 2.1.8