4 $tftp_dir = 'tftp/debian-live';
6 symlink '/usr/lib/syslinux/gpxelinux.0', "$tftp_dir/$file" unless -l "$tftp_dir/$file";
10 my $path = glob("$tftp_dir/$glob");
11 die "can't find anything for $tftp_dir/$glob" unless $path;
13 $path =~ s{^$tftp_dir}{};
17 my $pxelinux = "$tftp_dir/pxelinux.cfg";
19 if ( $server_ip ) { # FIXME refresh only from dhcpd
21 $pxelinux .= '/default';
23 my $url = "http://$server_ip/pxelator/debian-live/";
26 my $squash = path '*squashfs';
28 use File::Slurp qw/write_file/;
29 write_file $pxelinux, qq{
33 append initrd=$url/initrd1.img boot=live union=aufs noswap noprompt vga=normal fetch=$url/$squash
36 warn "created $pxelinux $squash\n";
38 warn "using $pxelinux";