Hi Angus: >louis, your mailer (USANET web-mailer (CM.1201.3.01A)) has a very confusing quoting style.
*** Not much I can do about it. >chroot just moves where the kernel says "/" is for a particular process. you will need to copy any files into the chroot location if you want those files to appear there.. *** I see. >my concern was with modules that do something more clever in Makefile.PL - other than simply compiling or copying files. there are a few CPAN modules around that will try and autodetect (or prompt for) different configurations. these might fail if they are copied into what looks like a different filesystem (without whatever they had just checked for). *** Well so far my scripts are running fine. Hopefully I won't encounter this issue. >i'd say about 95% of CPAN modules will work fine with a simply recursive copy, however. *** Glad to hear that. >curious. assuming you have GNU cp, thats a bug in your manpage. "cp --help" should give enough information anyway. *** The machine I tried it on did not have it. However I just checked my server and it has the options you mentioned. >choose one of the methods above. i'll choose rsync, since that should avoid lots of unnecessary copying. *** Yes I agree rsync is the better option. I read a bit about it from the web, and I just installed it on my server. >assuming you have an /etc/cron.daily/ directory: (if you don't, tell us your distro) *** Yes I have /etc/cron.daily/ >create the file /etc/cron.daily/copychroots, containing: > <begin file> #! /bin/sh # # script to update perl in already installed chroots # USERS="domain.com otherdomain.net yadomain.org" # automatically update the template directory using what is installed # in the "real" system. # (you may not want to do this automatically) rsync -a /usr/lib/perl5 /template/directory/usr/lib/perl5 # copy the template directory into each user's chroot for user in $USERS; do rsync -a /template/directory/usr/lib/perl5 /home/virtual/$user/usr/lib/perl5 done <end file> *** Many thanks for this. I will try it first manually before setting up cron. >if you use any perl modules that link to shared libraries, you will need to copy the libraries in too, of course. *** After reading the rsync help manual I was thinking this rsync -aruL /template/directory/usr/lib/perl5 /home/virtual/$user/ I'm not sure if I want to use --delete option yet. I see above you say rsync -a /template/directory/usr/lib/perl5 /home/virtual/$user/usr/lib/perl5 i.e. you have /usr/bin/perl5 as part of /home/virtual/$user. Would below still work rsync -a /template/directory/usr/lib/perl5 /home/virtual/$user/ or do I need to specify /usr/bin/perl5 as part of the virtual sites path ? I suppose by testing I will find that out anyway. But the manual gave this example below: +++++++++++++++++++++++++++ rsync -avz foo:src/bar /data/tmp this would recursively transfer all files from the directory src/bar on the machine foo into the /data/tmp/bar directory on the local machine. +++++++++++++++++++++++++++ >(other directories can be copied by just duplicating the rsync lines (with new paths)) *** Not sure what you mean here. Louis. -- SLUG - Sydney Linux User's Group - http://slug.org.au/ More Info: http://lists.slug.org.au/listinfo/slug
