2 |
|
|
3 |
use warnings; |
use warnings; |
4 |
use strict; |
use strict; |
5 |
|
use autodie; |
6 |
|
|
7 |
use File::Slurp; |
use File::Slurp; |
8 |
|
|
14 |
symlink '/usr/lib/syslinux/gpxelinux.0', $path unless -l $path; |
symlink '/usr/lib/syslinux/gpxelinux.0', $path unless -l $path; |
15 |
warn "file $path ", -s $path; |
warn "file $path ", -s $path; |
16 |
|
|
17 |
my $url = "http://$server::ip/pxelator/debian-live/"; |
my $url = "http://$server::ip/pxelator/"; |
18 |
my $squash = tftpd::path('debian-live/*squashfs'); |
$url = "tftp://$server::ip/"; # fallback to tftp |
19 |
|
|
20 |
|
my $squash = tftpd::path('debian-live/*squashfs'); |
21 |
|
|
22 |
my $config = "$ftpd::dir/pxelinux.cfg/default"; |
my $config = "$tftpd::dir/pxelinux.cfg/default"; |
23 |
|
|
24 |
write_file $config, qq{ |
write_file $config, qq{ |
25 |
|
|
26 |
default linux |
default linux |
27 |
label linux |
label linux |
28 |
kernel $url/vmlinuz1 |
kernel $url/debian-live/vmlinuz1 |
29 |
append initrd=$url/initrd1.img boot=live union=aufs noswap noprompt vga=normal fetch=$url/$squash |
append initrd=$url/debian-live/initrd1.img boot=live union=aufs noswap noprompt vga=normal fetch=http://$server::ip/pxelator/$squash |
30 |
|
|
31 |
}; |
}; |
32 |
|
|