From: Andrea Righi [mailto:[EMAIL PROTECTED]
Sent: Sun 07/05/2006 03:09
To: Bernard Li
Cc: Brian Elliott Finley; [email protected]
Subject: Re: [Sisuite-devel] ia64 success!
Bernard Li wrote:
> Welcome back! :-)
>
> I'd
like to set the seeder with
>
/etc/init.d/systemimager-server-bittorrent.
>
> Okay, how about we
keep a checksum of the image directory
>
/var/lib/systemimager/images/<image> and before we start seeding,
we
> check to see if it has changed - if it has, then we run it with
the
> --update option - would that work?
That should work almost
for everything... even if md5sum (as sha1sum) is
able to evaluate the
checksum only for regular files... what about
directories, symlinks and
/dev/* files.. think at md5sum /dev/sda or
md5sum /dev/urandom :-).
So
the approach would be to save a total checksum for the regular
files:
find <image_path> -type f -exec md5sum {} \; |
md5sum
And then save a checksum of the metadata informations for special
files,
for example with:
find <image_path> -not -type f -exec ls
-l {} \; | md5sum
I don't know if it takes more time than running
--update all the
times...
Cheers,
-Andrea
