Title: Re: [Sisuite-devel] ia64 success!
Hi Andrea:
 
Perhaps doing update all the time is the best way - perhaps we can add this as a configuration option.
 
How about we break this into 2 components - one is the seeder which only cares about starting/stopping the seeder, and the other is a command line tool which updates the tarball (with the --force option to always update).
 
In that case, if the user decides that he has a recent enough computer and doesn't mind updating the tarball all the time, it can be set in the configuration, otherwise, the user has to manually update it if he/she has made modifications to the image before starting the seeder.
 
What do you think?
 
Cheers,
 
Bernard


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

Reply via email to