From: Sam Vilain (sam_at_vilain.net)
Date: Fri 08 Mar 2002 - 12:01:29 GMT
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).
For this script to work, you'll need to install Pod::Constants and
ReadDir, from my modules collection (http://sam.vilain.net/pm/).
The script is at http://sam.vilain.net/vserver/unify-dirs
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
Sam.
On Wed, 6 Mar 2002 20:24:03 +0300
Konstantin Starodubtsev <klists_at_rbcmail.ru> wrote:
> I'm porting vserver utilities to Debian.
> As a part of this job vunify utility was rewritten on perl.
> The package-manager dependent part was moved to external object module.
> For example dpkg module is 1582 bytes long and was written in 30-40
minutes. I don't think that modules for other package managers will take
much more time to write. The main part of utility is about 5.5Kb and it is
not package-manager dependent. You can get it with necessary modules at
http://tranq.dorms.spbu.ru/data/vunify.tar.gz> It is not 100% compatible
with current vunify now as I'm thinking about placing some defaults
(hard-coded in current vunify.cc) now in /etc/vservers.conf so it's
behaviour sometimes a bit different comparing to old vunify. So, if anyone
thinks anything about it then comments, questions and patches are welcome
:)>
> The other question appeared during vunify development. We still doesn't
have global config file (i.e. /etc/vservers.conf). It can be useful to
share system-wide settings between parts of vserver utilities. The most
important variable is VSERVERS_HOME - the directory, where vservers are
located. I don't want to say, that current standart (/vservers) is bad,
though it can violate FHS on some systems.>
> Also deb package is available for Debian linux. It should violate FHS a
bit, and doesn't provide correct set of dependancies though it can be
better than nothing :) The main changes are: > ported vunify,
> fixed vserver script wrong behaivor during shutdown (btw, why don't we
write current runlevel in the /var/run/utmp after vserver startup?), >
some fixes to fit better into Debian FHS.> It is available at
http://tranq.dorms.spbu.ru/data/vserver-bin_0.13-1_i386.deb>
> MBR,
> Konstantin Starodubtsev.
>
>
>
-- Sam Vilain, sam_at_vilain.net WWW: http://sam.vilain.net/ 7D74 2A09 B2D3 C30F F78E GPG: http://sam.vilain.net/sam.asc 278A A425 30A9 05B5 2F13