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


-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Sisuite-devel mailing list
Sisuite-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sisuite-devel

Reply via email to