Re: [vserver] modular vunify

About this list Date view Thread view Subject view Author view Attachment view

From: klavs klavsen (
Date: Sat Mar 09 2002 - 05:15:24 EST

On Fri, 2002-03-08 at 13:01, Sam Vilain wrote:
> I also have a Perl solution.
> My script[1] is not tied to a distribution at all; it merely scans X
> (where X >= 2) directory structures, and where files are identical in the
> two structures, it hard links them (and optionally sets immutable and
> immutable linkage invert inode attributes, btw thanks for the chattr()
> routine).
Watch out for the comparison. A file can look exactly alike, according
to ls -l, and still not be the same. I would definetely do a sha1 or
md5sum check to ensure that they are truely identical.

> For this script to work, you'll need to install Pod::Constants and
> ReadDir, from my modules collection (
> The script is at
> You could use it like this:
> unify-dirs -vil /vservers/*/usr
> unify-dirs -vil /vservers/*/lib
> unify-dirs -vil /vservers/*/sbin
> unify-dirs -vil /vservers/*/bin
sounds very cool.. perhaps i'll have a look at making it log, which
files it vunified - and then the next day, you could run it against the
log, and it would tell you if anything changed - a very simple but
effective IDS.


Klavs Klavsen

-------------| This mail has been sent to you by: |------------ Klavs Klavsen - Open Source Consultant -

Get PGP key from - Key ID: 0x586D5BCA Fingerprint = A95E B57B 3CE0 9131 9D15 94DA E1CD 641E 586D 5BCA --------------------[ I believe that... ]----------------------- It is a myth that people resist change. People resist what other people make them do, not what they themselves choose to do... That's why companies that innovate successfully year after year seek their peopl's ideas, let them initiate new projects and encourage more experiments. -- Rosabeth Moss Kanter

About this list Date view Thread view Subject view Author view Attachment view

This archive was generated by hypermail 2.1.4 : Mon Aug 19 2002 - 12:01:01 EDT