--- lib/PXElator/pxe.pm 2009/07/29 22:04:58 45 +++ lib/PXElator/pxe.pm 2009/07/29 22:25:42 46 @@ -2,6 +2,7 @@ use warnings; use strict; +use autodie; use File::Slurp; @@ -13,18 +14,19 @@ symlink '/usr/lib/syslinux/gpxelinux.0', $path unless -l $path; warn "file $path ", -s $path; -my $url = "http://$server::ip/pxelator/debian-live/"; -my $squash = tftpd::path('debian-live/*squashfs'); +my $url = "http://$server::ip/pxelator/"; +$url = "tftp://$server::ip/"; # fallback to tftp +my $squash = tftpd::path('debian-live/*squashfs'); -my $config = "$ftpd::dir/pxelinux.cfg/default"; +my $config = "$tftpd::dir/pxelinux.cfg/default"; write_file $config, qq{ default linux label linux - kernel $url/vmlinuz1 - append initrd=$url/initrd1.img boot=live union=aufs noswap noprompt vga=normal fetch=$url/$squash + kernel $url/debian-live/vmlinuz1 + append initrd=$url/debian-live/initrd1.img boot=live union=aufs noswap noprompt vga=normal fetch=http://$server::ip/pxelator/$squash };