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/bash.new
>> mv /bin/bash.new /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/script.py{,.orig}
$ cp -av /usr/local/bin/script.py{.orig,}
$ jmacs /usr/local/bin/script.py
if my changes work:
$ rm /usr/local/bin/script.py.orig
if my changes don't work:
$ rm /usr/local/bin/script.py
$ mv /usr/local/bin/script.py{.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/bash.new
$ cp /bin/bash.new /bin/bash
$ rm /bin/bash.new
hopefully my original post helped more than it hurt.
thanks for the catch.
corey
-- undefined@pobox.com _______________________________________________ Vserver mailing list Vserver@list.linux-vserver.org http://list.linux-vserver.org/mailman/listinfo/vserverReceived on Wed May 10 17:33:13 2006