18 |
#$url = "tftp://$server::ip/"; # fallback to tftp |
#$url = "tftp://$server::ip/"; # fallback to tftp |
19 |
#$url = "http://$server::ip/pxelator/"; |
#$url = "http://$server::ip/pxelator/"; |
20 |
|
|
21 |
|
use LWP::Simple qw/mirror RC_NOT_MODIFIED/; |
22 |
|
foreach my $file ( 'vmlinuz1', 'initrd1.img', 'debian-live-501-i386-rescue.squashfs' ) { |
23 |
|
my $path = "$tftpd::dir/debian-live"; |
24 |
|
mkdir $path unless -e $path; |
25 |
|
# next if -e "$path/$file"; |
26 |
|
print STDERR "mirror $file "; |
27 |
|
mirror( "http://cdimage.debian.org/cdimage/release/current-live/i386/web/$file", "$path/$file") |
28 |
|
== RC_NOT_MODIFIED |
29 |
|
&& warn("not modified\n") |
30 |
|
|| warn("mirrored ", -s "$path/$file", "\n") |
31 |
|
; |
32 |
|
} |
33 |
|
|
34 |
sub config_for_ip { |
sub config_for_ip { |
35 |
|
|